From 7503bf27279b9f5f32c6c0385dfcae62cd74db8b Mon Sep 17 00:00:00 2001 From: fape Date: Mon, 31 Dec 2018 16:18:41 +0100 Subject: [PATCH] fix compile error --- Arduino/chorus_rf_laptimer/chorus_rf_laptimer.ino | 1 + Arduino/chorus_rf_laptimer/mainDetectionAlgorithm.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Arduino/chorus_rf_laptimer/chorus_rf_laptimer.ino b/Arduino/chorus_rf_laptimer/chorus_rf_laptimer.ino index 543b7eb..7bd4bed 100644 --- a/Arduino/chorus_rf_laptimer/chorus_rf_laptimer.ino +++ b/Arduino/chorus_rf_laptimer/chorus_rf_laptimer.ino @@ -236,6 +236,7 @@ uint8_t isSendQueueFull = 0; //----- Lap timings-------------------------------- uint32_t lastMilliseconds = 0; +uint32_t now = 0; uint32_t raceStartTime = 0; #define MIN_MIN_LAP_TIME 1 //seconds #define MAX_MIN_LAP_TIME 120 //seconds diff --git a/Arduino/chorus_rf_laptimer/mainDetectionAlgorithm.h b/Arduino/chorus_rf_laptimer/mainDetectionAlgorithm.h index 2b4fa08..a96bf91 100644 --- a/Arduino/chorus_rf_laptimer/mainDetectionAlgorithm.h +++ b/Arduino/chorus_rf_laptimer/mainDetectionAlgorithm.h @@ -5,7 +5,7 @@ void runLapDetectionAlgorithm() { if (allowLapGeneration) { // we haven't fired event for this drone proximity case yet allowLapGeneration = 0; - uint32_t now = millis(); + now = millis(); uint32_t diff = now - lastMilliseconds; //time diff with the last lap (or with the race start) if (timeAdjustment != 0 && timeAdjustment != INFINITE_TIME_ADJUSTMENT) { diff = diff + (int32_t)diff/timeAdjustment;