From 813ecec4221784e7d76a78a648be56b698eee167 Mon Sep 17 00:00:00 2001 From: Scott Smith Date: Mon, 20 May 2019 23:22:21 -0700 Subject: [PATCH] Avoid PWM value 255 for TLE5206 This patrch only affects TLE5206 boards, changing a PWM value from 255 to 254. This works around the symptom noted in issue #500 --- cnc_ctrl_v1/Motor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cnc_ctrl_v1/Motor.cpp b/cnc_ctrl_v1/Motor.cpp index 99baf313..9c755871 100644 --- a/cnc_ctrl_v1/Motor.cpp +++ b/cnc_ctrl_v1/Motor.cpp @@ -144,6 +144,7 @@ void Motor::write(int speed, bool force){ } } else { // TLE5206 + speed = constrain(speed, 0, 254); // avoid issue when PWM value is 255 if (forward) { if (speed > 0) { if (usePin2) {