aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2018-02-03 14:31:17 +0200
committerRoy <roy.mail.net@gmail.com>2018-02-03 14:31:17 +0200
commit9fa032b7aea6f2fbfdae05d21c3c10db174e1662 (patch)
tree86c6ad4309bddc7d0641d344584998bc51a22722 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels
parentbe23e3a8def254ecb161ad21d82024987097ba1d (diff)
downloadTango-9fa032b7aea6f2fbfdae05d21c3c10db174e1662.tar.gz
Tango-9fa032b7aea6f2fbfdae05d21c3c10db174e1662.zip
Same as previous..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index 4f045627d..08b8897d2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
@@ -22,6 +22,7 @@ using Tango.Video.DirectCapture;
using Tango.Integration.Operators;
using Tango.PMR.Diagnostics;
using System.Reflection;
+using Tango.PMR.Common;
namespace Tango.MachineStudio.Developer.ViewModels
{
@@ -470,7 +471,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
}
}
- private void MachineOperator_DiagnosticsDataAvailable(object sender, StartDiagnosticsResponse response)
+ private void MachineOperator_DiagnosticsDataAvailable(object sender, PushDiagnosticsResponse response)
{
foreach (var prop in response.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
{
@@ -485,7 +486,8 @@ namespace Tango.MachineStudio.Developer.ViewModels
}
else
{
- //Multi Graph...
+ DoubleArray[] arrayOfDoubles = Enumerable.ToArray(prop.GetValue(response) as IEnumerable<DoubleArray>);
+ (controller as GraphMultiController).PushData(arrayOfDoubles.Select(x => x.Data.ToList()).ToList());
}
}
}
@@ -911,11 +913,13 @@ namespace Tango.MachineStudio.Developer.ViewModels
for (int i = 0; i < sensor.ChannelCount; i++)
{
+ var randomColor = new SolidColorBrush(Core.Helpers.ColorHelper.GetRandomColor());
+
(controller as GraphMultiController).AddSeries(new DataYSeries()
{
Name = sensor.Description.First().ToString() + (i + 1),
UseFillAndStroke = true,
- Stroke = new SolidColorBrush(Core.Helpers.ColorHelper.GetRandomColor())
+ Stroke = randomColor
});
}