diff --git a/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp b/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp index 1597382..9cf35ed 100644 --- a/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp +++ b/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp @@ -547,10 +547,12 @@ int32_t StepMotorCtrlModule::do_step_motor_easy_rotate(int32_t direction) { [this, direction]() { befor_motor_move(); { - m_stepM1->set_amax(m_cfg.motor_amax); - int32_t vel = m_cfg.motor_default_velocity; - if (direction <= 0) vel = -vel; - m_stepM1->rotate(vel); + // m_stepM1->set_amax(m_cfg.motor_amax); + // int32_t vel = m_cfg.motor_default_velocity; + // if (direction <= 0) vel = -vel; + // m_stepM1->rotate(vel); + + m_stepM1->moveToEnd(direction, m_cfg.motor_default_velocity); while (true) { if (m_thread.getExitFlag()) break;