|
|
@ -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; |
|
|
|