diff --git a/src/hal/tmc2130.cpp b/src/hal/tmc2130.cpp index e11c741..fc162ba 100644 --- a/src/hal/tmc2130.cpp +++ b/src/hal/tmc2130.cpp @@ -8,7 +8,7 @@ namespace hal { namespace tmc2130 { bool TMC2130::Init(const MotorParams ¶ms, const MotorCurrents ¤ts, MotorMode mode) { - sg_filter_threshold = (1 << (8 - params.mRes)) - 1; + sg_filter_threshold = (1 << (8 - params.mRes)); gpio::Init(params.csPin, gpio::GPIO_InitTypeDef(gpio::Mode::output, gpio::Level::high)); gpio::Init(params.sgPin, gpio::GPIO_InitTypeDef(gpio::Mode::input, gpio::Pull::up));