[chronojump] Fixed Run interval lastTc added to each track after a double contact



commit 5fbc4f0839e8355e137712abf94b27350155eebd
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Mar 13 16:43:26 2018 +0100

    Fixed Run interval lastTc added to each track after a double contact

 src/execute/run.cs |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/execute/run.cs b/src/execute/run.cs
index 2d237f1..b49ba80 100644
--- a/src/execute/run.cs
+++ b/src/execute/run.cs
@@ -668,6 +668,7 @@ public class RunIntervalExecute : RunExecute
                                                        }
                                                }
 
+                                               //note in double contacts mode timestamp can have added 
DCFlightTimes and DCContactTimes. So contact time is not only on lastTc
                                                double myRaceTime = lastTc + timestamp/1000.0;
                                                LogB.Information(string.Format("RACE ({0}) TC: {1}; TV: {2}; 
TOTALTIME: {3}", tracks, lastTc, timestamp/1000.0, myRaceTime));
 
@@ -740,22 +741,21 @@ public class RunIntervalExecute : RunExecute
                                else if (platformState == Chronopic.Plataforma.OFF && loggedState == 
States.ON) {
                                        //it's out, was inside (= has abandoned platform)
                                                        
+                                       lastTc = 0;
                                        if(runPhase == runPhases.PLATFORM_INI_NO_TIME) {
                                                //run starts
                                                initializeTimer();
-                                               lastTc = 0;
 
                                                feedbackMessage = "";
                                                needShowFeedbackMessage = true; 
                                        } else if(runPhase == runPhases.PLATFORM_INI_YES_TIME)
                                        {
-                                               lastTc = 0;
                                                if(measureReactionTime)
                                                        reactionTimeMS = timestamp;
 
                                                // measuringReactionTime or not, if speedStartArrival, 1st 
race time should include lastTc
                                                if(speedStartArrival)
-                                                       lastTc = timestamp/1000.0;
+                                                       lastTc = timestamp / 1000.0;
 
                                                feedbackMessage = "";
                                                needShowFeedbackMessage = true; 
@@ -763,7 +763,7 @@ public class RunIntervalExecute : RunExecute
                                                if(checkDoubleContactMode != Constants.DoubleContact.NONE && 
timestampDCn > 0)
                                                        timestampDCContactTimes += timestamp;
                                                else 
-                                                         lastTc = timestamp/1000.0;
+                                                       lastTc = timestamp / 1000.0;
                                                
                                                
                                                //RSA


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