From 309d4704b70f7264c84822d692786e56deb8d41b Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Tue, 31 Aug 2021 09:03:57 +0200 Subject: [PATCH] Fix return value of TMC2130::Init --- src/hal/tmc2130.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hal/tmc2130.cpp b/src/hal/tmc2130.cpp index ef6ae33..42bcd77 100644 --- a/src/hal/tmc2130.cpp +++ b/src/hal/tmc2130.cpp @@ -15,7 +15,7 @@ bool TMC2130::Init(const MotorParams ¶ms, const MotorCurrents ¤ts, Mot // if the version is incorrect or a bit always set to 1 is suddenly 0 // (the supposed SD_MODE pin that doesn't exist on this driver variant) if (((IOIN >> 24U) != 0x11) | !(IOIN & (1U << 6U))) - return true; // @@TODO return some kind of failure + return false; // @@TODO return some kind of failure ///clear reset_flag as we are (re)initializing errorFlags.reset_flag = false; @@ -58,7 +58,7 @@ bool TMC2130::Init(const MotorParams ¶ms, const MotorCurrents ¤ts, Mot /// Stallguard is also disabled if the velocity falls below this. /// Should be set as high as possible when homing. SetMode(params, mode); - return false; + return true; } void TMC2130::SetMode(const MotorParams ¶ms, MotorMode mode) {