|
|
@ -599,9 +599,17 @@ int32_t StepMotorCtrlModule::do_step_motor_easy_move_to_zero() { |
|
|
|
m_thread.start( |
|
|
|
[this]() { |
|
|
|
befor_motor_move(); |
|
|
|
exec_move_to_io_task(0, -1); |
|
|
|
bool moveToZeroSuc = false; |
|
|
|
do { |
|
|
|
if (!exec_move_to_io_task(0, -1)) { |
|
|
|
break; |
|
|
|
} |
|
|
|
moveToZeroSuc = true; |
|
|
|
} while (false); |
|
|
|
after_motor_move(); |
|
|
|
if (moveToZeroSuc) { |
|
|
|
setnowpos(0 + m_cfg.motor_dzero); |
|
|
|
} |
|
|
|
}, |
|
|
|
[this]() { m_stepM1->stop(); }); |
|
|
|
return 0; |
|
|
|