From bec3f7386432cf2604940cf6453790902975313f Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Fri, 3 Sep 2021 17:50:03 +0300 Subject: [PATCH] Fix typo typo --- src/config/config.h | 6 +++--- src/hal/tmc2130.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/config/config.h b/src/config/config.h index 9f8d096..515663b 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -154,9 +154,9 @@ static_assert(tmc2130_PWM_AUTOSCALE <= 1, "tmc2130_PWM_AUTOSCALE out of range"); /// Freewheel options for standstill: /// 0: Normal operation (IHOLD is supplied to the motor at standstill) -/// 1: Freewheeling (as if the driver was disabled, no breaking except for detent torque) -/// 2: Coil shorted using LS drivers (stronger passive breaking) -/// 3: Coil shorted using HS drivers (weaker passive breaking) +/// 1: Freewheeling (as if the driver was disabled, no braking except for detent torque) +/// 2: Coil shorted using LS drivers (stronger passive braking) +/// 3: Coil shorted using HS drivers (weaker passive braking) static constexpr uint32_t tmc2130_freewheel = 1; static_assert(tmc2130_PWM_AUTOSCALE <= 3, "tmc2130_freewheel out of range"); diff --git a/src/hal/tmc2130.cpp b/src/hal/tmc2130.cpp index 3b0971a..f0e0e07 100644 --- a/src/hal/tmc2130.cpp +++ b/src/hal/tmc2130.cpp @@ -63,7 +63,7 @@ bool TMC2130::Init(const MotorParams ¶ms, const MotorCurrents ¤ts, Mot } void TMC2130::SetMode(const MotorParams ¶ms, MotorMode mode) { - ///0xFFF00 is used as a "Normal" mode threshold since stealthchop will be used at standstill. + ///0xFFFF0 is used as a "Normal" mode threshold since stealthchop will be used at standstill. WriteRegister(params, Registers::TPWMTHRS, (mode == Stealth) ? 70 : 0xFFFF0); // @@TODO should be configurable }