aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-16 13:38:36 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-16 13:38:36 +0200
commit57f72e9c530316129b14a5f1f04a357fa0a00eec (patch)
treef2b00cc1dfeba53e849ab44d2b33c4f211236e63 /Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs
parent97c9eba97fefac75fa2399778514760ab36a5186 (diff)
downloadTango-57f72e9c530316129b14a5f1f04a357fa0a00eec.tar.gz
Tango-57f72e9c530316129b14a5f1f04a357fa0a00eec.zip
Same as previous commit.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs
index aa039e7ae..68f68d47c 100644
--- a/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operators/MachineOperator.cs
@@ -16,9 +16,9 @@ namespace Tango.Integration.Operators
public class MachineOperator : BasicTransporter, IMachineOperator
{
/// <summary>
- /// Occurs when there is new sensors data available.
+ /// Occurs when there is new diagnostics data available.
/// </summary>
- public event EventHandler<PushSensorsResponse> SensorsDataAvailable;
+ public event EventHandler<StartDiagnosticsResponse> DiagnosticsDataAvailable;
private bool _enableDiagnostics;
/// <summary>
@@ -46,10 +46,15 @@ namespace Tango.Integration.Operators
{
if (value && State == TransportComponentState.Connected)
{
- SendContinuousRequest<PushSensorsRequest, PushSensorsResponse>(new TangoMessage<PushSensorsRequest>(new PushSensorsRequest(), PMR.Common.MessageType.PushSensorsRequest)).ObserveOn(new NewThreadScheduler()).Subscribe(
+ SendContinuousRequest<StartDiagnosticsRequest, StartDiagnosticsResponse>(new TangoMessage<StartDiagnosticsRequest>(new StartDiagnosticsRequest()
+ {
+ PushMotors = true,
+ PushSensors = true,
+
+ }, PMR.Common.MessageType.StartDiagnosticsRequest)).ObserveOn(new NewThreadScheduler()).Subscribe(
(response) =>
{
- OnSensorsDataAvailable(response);
+ OnDiagnosticsDataAvailable(response);
},
(ex) =>
{
@@ -63,12 +68,12 @@ namespace Tango.Integration.Operators
}
/// <summary>
- /// Invokes the <see cref="SensorsDataAvailable"/> event.
+ /// Invokes the <see cref="DiagnosticsDataAvailable"/> event.
/// </summary>
/// <param name="data">The sensors data.</param>
- protected virtual void OnSensorsDataAvailable(PushSensorsResponse data)
+ protected virtual void OnDiagnosticsDataAvailable(StartDiagnosticsResponse data)
{
- SensorsDataAvailable?.Invoke(this, data);
+ DiagnosticsDataAvailable?.Invoke(this, data);
}
/// <summary>