Browse Source

fix step motor ctrl bug

master
zhaohe 2 years ago
parent
commit
c2e51f7706
  1. 5
      components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

5
components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

@ -417,7 +417,10 @@ int32_t StepMotorCtrlModule::exec_move_to_zero_task() {
_motor_move_by(m_param.look_zero_edge_max_d, m_param.look_zero_edge_speed, m_param.acc, m_param.look_zero_edge_dec);
while (!_motor_is_reach_target()) {
if (m_thread.getExitFlag()) break;
if (!m_Xgpio->getState()) break;
if (!m_Xgpio->getState()) {
_motor_stop(-1);
break;
}
vTaskDelay(1);
}
}

Loading…
Cancel
Save