From 9879f87a345bec10a3ee26e9ec669add2b5bfcd3 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 15 Feb 2018 15:04:39 +0200 Subject: Enable Diagnostics on connection. --- .../Tango.Integration/Operators/MachineOperator.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs') diff --git a/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs index 4bbd7aa64..eaa72541c 100644 --- a/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs @@ -25,6 +25,8 @@ namespace Tango.Integration.Operators /// public class MachineOperator : BasicTransporter, IMachineOperator { + private bool _diagnosticsSent; + #region Events /// @@ -59,7 +61,7 @@ namespace Tango.Integration.Operators #region Virtual Methods /// - /// Called when the enable sensors update property has been changed + /// Called when the enable diagnostics property has been changed /// /// if set to true [value]. protected virtual void OnEnableDiagnosticsChanged(bool value) @@ -74,17 +76,24 @@ namespace Tango.Integration.Operators }, MessageType.PushDiagnosticsRequest)).ObserveOn(new NewThreadScheduler()).Subscribe( (response) => { + _diagnosticsSent = true; OnDiagnosticsDataAvailable(response); }, (ex) => { + _diagnosticsSent = false; //Do I need separate event for each one ?? }, () => { + _diagnosticsSent = false; //What to do now ?? }); } + else + { + _diagnosticsSent = false; + } } /// -- cgit v1.3.1