diff --git a/components/tmc/ic/ztmc4361A.cpp b/components/tmc/ic/ztmc4361A.cpp index a4b70b8..8b156fc 100644 --- a/components/tmc/ic/ztmc4361A.cpp +++ b/components/tmc/ic/ztmc4361A.cpp @@ -132,9 +132,9 @@ void TMC4361A::setAcceleration(float accelerationpps2) { * AMAX [pps2] = AMAX / 237 ?? fCLK^2 */ - // accelerationpps2 = to_motor_acc(accelerationpps2); - // int32_t acc = (int32_t)accelerationpps2; - // tmc4361_writeInt(TMC4361A_AMAX, acc << 2); + accelerationpps2 = to_motor_acc(accelerationpps2); + int32_t acc = (int32_t)accelerationpps2; + tmc4361_writeInt(TMC4361A_AMAX, acc << 2); } void TMC4361A::setDeceleration(float accelerationpps2) { /** @@ -147,9 +147,9 @@ void TMC4361A::setDeceleration(float accelerationpps2) { * a[?v per clk_cycle]= AMAX / 2^37 * AMAX [pps2] = AMAX / 237 ?? fCLK^2 */ - // accelerationpps2 = to_motor_acc(accelerationpps2); - // int32_t acc = (int32_t)accelerationpps2; - // tmc4361_writeInt(TMC4361A_DMAX, acc << 2); + accelerationpps2 = to_motor_acc(accelerationpps2); + int32_t acc = (int32_t)accelerationpps2; + tmc4361_writeInt(TMC4361A_DMAX, acc << 2); } #define INIT_GPIO(m_pin, pin, ...) \ if (pin != PinNull) { \