From 129a89cf075b55a1024ecaf3659ea0db798f1291 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