[chronojump] RaceAnalyzer. Fixed time in last sample
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] RaceAnalyzer. Fixed time in last sample
- Date: Thu, 20 Jun 2019 14:10:12 +0000 (UTC)
commit abdcdc0ab3e72c7e4a998066d51ad251b5fc4a3c
Author: Xavier Padullés <x padulles gmail com>
Date: Wed Jun 19 11:45:27 2019 +0200
RaceAnalyzer. Fixed time in last sample
arduino/raceAnalyzer/raceAnalyzer.ino | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/arduino/raceAnalyzer/raceAnalyzer.ino b/arduino/raceAnalyzer/raceAnalyzer.ino
index fe538a63..5e5e397c 100644
--- a/arduino/raceAnalyzer/raceAnalyzer.ino
+++ b/arduino/raceAnalyzer/raceAnalyzer.ino
@@ -102,8 +102,10 @@ void loop() {
//force = readOffsettedData(0);
//total += force;
nReadings++;
+
+ //If some string comes from Serial process the sample
if (Serial.available() > 0) {
- changingTime = micros();
+ sampleTime = micros();
lastEncoderDisplacement = encoderDisplacement;
encoderDisplacement = 0;
procesSample = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]