[chronojump] Force sensor time corrected



commit 7f78a509f5868195c8a061357a005f86c70a6b22
Author: Xavier Padullés <x padulles gmail com>
Date:   Fri Aug 11 13:44:35 2017 +0200

    Force sensor time corrected

 arduino/ForceSensor/ForceSensor.ino |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/arduino/ForceSensor/ForceSensor.ino b/arduino/ForceSensor/ForceSensor.ino
index 019e52f..6c304de 100644
--- a/arduino/ForceSensor/ForceSensor.ino
+++ b/arduino/ForceSensor/ForceSensor.ino
@@ -83,6 +83,7 @@ void loop() {
       elapsedTime = (4294967295 - lastTime) + currentTime; //Time from the last measure to the overflow 
event plus the currentTime
     }
     totalTime += elapsedTime;
+    lastTime = currentTime;
     Serial.print(totalTime);
     Serial.print(";");
     Serial.println(scale.get_units(), 1); //scale.get_units() returns a float


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