|
|
@ -610,7 +610,7 @@ int32_t StepMotorCtrlModule::do_step_motor_easy_rotate(int32_t direction) { |
|
|
|
befor_motor_move(); |
|
|
|
{ |
|
|
|
// rotate(direction, m_cfg.motor_default_velocity);
|
|
|
|
m_stepM1->rotate(direction >= 0 ? m_cfg.motor_default_velocity : -m_cfg.motor_default_velocity); |
|
|
|
rotateInVelocityMode(direction >= 0 ? m_cfg.motor_default_velocity : -m_cfg.motor_default_velocity); |
|
|
|
|
|
|
|
while (true) { |
|
|
|
if (m_thread.getExitFlag()) break; |
|
|
@ -790,9 +790,15 @@ int32_t StepMotorCtrlModule::moveTo(int32_t x, int32_t v) { |
|
|
|
return 0; |
|
|
|
} |
|
|
|
int32_t StepMotorCtrlModule::rotate(int32_t direction, int32_t v) { |
|
|
|
trysyncpos(); |
|
|
|
m_stepM1->moveToEnd(direction, v); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
int32_t StepMotorCtrlModule::rotateInVelocityMode(int32_t v) { |
|
|
|
trysyncpos(); |
|
|
|
m_stepM1->rotate(v); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
int32_t StepMotorCtrlModule::update_dzero(int32_t dzero) { |
|
|
|
int32_t now; |
|
|
|