From 42dfd646a14c5d59fb5bf47c5453c6b7b64f63cf Mon Sep 17 00:00:00 2001 From: Abel Tim Date: Sun, 8 Feb 2026 12:32:47 +0100 Subject: im a idiot had m1encSP to < 0 give error but a motor can also be not moving no < 0 so --- code/debug/motors/PID/PID.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/debug/motors/PID/PID.ino b/code/debug/motors/PID/PID.ino index 1e86a5d..86a32ee 100644 --- a/code/debug/motors/PID/PID.ino +++ b/code/debug/motors/PID/PID.ino @@ -73,7 +73,7 @@ void updateSpeed() { //6 interupts per rotation and interuptDuration but in seconds m1encSP = (m1enc / 6.0) / (interuptDuration/1000.0); m1enc = 0; - if (m1encSP < 1 || isnan(m1encSP)) { + if (m1encSP < 0 || isnan(m1encSP)) { m1encSP = 0; tone(buzzer, 1000); Serial.println(" ___________________________"); -- cgit v1.2.3