[chronojump] Shown force sensor capture time while capturing



commit 4aaf4baa6d2e04ee26a7094ed9fe72477e640385
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Jun 11 13:17:28 2018 +0200

    Shown force sensor capture time while capturing

 src/gui/forceSensor.cs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index cfedfcd5..7c1660e7 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -105,7 +105,7 @@ public partial class ChronoJumpWindow
        static arduinoCaptureStatus capturingForce = arduinoCaptureStatus.STOP;
        static bool redoingPoints; //don't draw while redoing points (adjusting screen)
 
-       static bool forceCaptureStartMark;      //Just needed to display "Capturing message"
+       static bool forceCaptureStartMark;      //Just needed to display Capturing message (with seconds)
        static ForceSensorValues forceSensorValues;
 
        string forceSensorPortName;
@@ -577,6 +577,7 @@ public partial class ChronoJumpWindow
                while(! str.Contains("Starting capture"));
 
                forceCaptureStartMark = true;
+               forceSensorTimeStart = DateTime.Now; //to have an active count of capture time
                capturingForce = arduinoCaptureStatus.CAPTURING;
 
                Util.CreateForceSensorSessionDirIfNeeded (currentSession.UniqueID);
@@ -760,8 +761,8 @@ LogB.Information(" re D ");
 LogB.Information(" re E ");
                if(forceCaptureStartMark)
                {
-                       event_execute_label_message.Text = "Capturing ...";
-                       forceCaptureStartMark = false;
+                       event_execute_label_message.Text = "Capturing" +
+                                       " (" + 
Util.TrimDecimals(DateTime.Now.Subtract(forceSensorTimeStart).TotalSeconds, 0) + " s)";
                }
 LogB.Information(" re F ");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]