From d5f410a452e1c24246a8682a528a56821ca1c30b Mon Sep 17 00:00:00 2001 From: jgstroud Date: Tue, 2 Jan 2024 22:57:06 -0600 Subject: [PATCH] Fix the millis timer veriable data types --- src/ratgdo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ratgdo.cpp b/src/ratgdo.cpp index 70e2bbd1..37a5dbf5 100644 --- a/src/ratgdo.cpp +++ b/src/ratgdo.cpp @@ -108,7 +108,7 @@ void IRAM_ATTR isr_obstruction() { void obstruction_timer() { if (!obstruction_sensor.detected) return; - long current_millis = millis(); + unsigned long current_millis = millis(); static unsigned long last_millis = 0; // the obstruction sensor has 3 states: clear (HIGH with LOW pulse every 7ms), obstructed (HIGH), asleep (LOW) @@ -152,7 +152,7 @@ void service_timer_loop() { // Service the Obstruction Timer obstruction_timer(); - long current_millis = millis(); + unsigned long current_millis = millis(); // LED Timer if (digitalRead(LED_BUILTIN) && (current_millis > led_on_time)) {