|
|
@ -164,6 +164,7 @@ int32_t TMC51X0Motor::move_to_zero(action_cb_status_t status_cb) { |
|
|
|
int32_t erro = _exec_move_to_zero_task(dx); |
|
|
|
if (erro == 0) { |
|
|
|
m_stepM1->setXACTUAL(0); |
|
|
|
m_stepM1->setENCVAL(0); |
|
|
|
} |
|
|
|
call_exec_status_cb(erro, status_cb); |
|
|
|
}, |
|
|
@ -193,6 +194,8 @@ int32_t TMC51X0Motor::move_to_zero_with_calibrate(int32_t nowx, action_cb_status |
|
|
|
m_param.motor_shift = calibrate_x; |
|
|
|
|
|
|
|
m_stepM1->setXACTUAL(0); |
|
|
|
m_stepM1->setENCVAL(0); |
|
|
|
|
|
|
|
call_exec_status_cb(erro, status_cb); |
|
|
|
return; |
|
|
|
}); |
|
|
@ -615,6 +618,7 @@ int32_t TMC51X0Motor::motor_calculated_pos_by_move_to_zero() { |
|
|
|
m_com_reg.module_last_cmd_exec_status = erro; |
|
|
|
set_last_exec_status(erro, -dx + m_param.motor_shift); |
|
|
|
m_stepM1->setXACTUAL(0); |
|
|
|
m_stepM1->setENCVAL(0); |
|
|
|
} |
|
|
|
}, |
|
|
|
[this]() { _motor_stop(); }); |
|
|
|