From 75ea171d8fad72cbb7e2c3917a10325682832af8 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Sun, 18 Jul 2021 09:13:55 +0300 Subject: [PATCH] Fix stall detection polarity --- src/hal/tmc2130.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hal/tmc2130.h b/src/hal/tmc2130.h index 2f57b55..437423c 100644 --- a/src/hal/tmc2130.h +++ b/src/hal/tmc2130.h @@ -111,7 +111,7 @@ public: /// Return SG state static inline bool Stall(const MotorParams ¶ms) { - return gpio::ReadPin(params.sgPin) == gpio::Level::high; + return gpio::ReadPin(params.sgPin) == gpio::Level::low; } /// Reads a driver register and updates the status flags