From 36d5802aa74f0e6f56e782d9b8e3b40dbe5ea082 Mon Sep 17 00:00:00 2001 From: Bart Moyaers Date: Wed, 11 Apr 2018 23:44:19 +0200 Subject: [PATCH] Don't plot datapoints with 0 time --- AccelVisualizer/Chart.xaml.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AccelVisualizer/Chart.xaml.cs b/AccelVisualizer/Chart.xaml.cs index 0cc5816..824f581 100644 --- a/AccelVisualizer/Chart.xaml.cs +++ b/AccelVisualizer/Chart.xaml.cs @@ -136,6 +136,12 @@ namespace AccelVisualizer private void PlotSensorData(StampedSensorData data) { + //If time is 0, don't plot + if(data.GetSeconds() == 0) + { + return; + } + //Convert to Measurement data types Measurement X, Y, Z; double now = data.GetSeconds() - startTime;