|
@ -129,7 +129,7 @@ int32_t StepMotorCtrlModule::step_motor_easy_rotate(int32_t direction) { |
|
|
m_stepM1->setDeceleration(m_cfg.motor_default_dec); |
|
|
m_stepM1->setDeceleration(m_cfg.motor_default_dec); |
|
|
|
|
|
|
|
|
int32_t vel = m_cfg.motor_default_velocity; |
|
|
int32_t vel = m_cfg.motor_default_velocity; |
|
|
if (direction == 0) vel = -vel; |
|
|
|
|
|
|
|
|
if (direction <= 0) vel = -vel; |
|
|
m_stepM1->rotate(vel); |
|
|
m_stepM1->rotate(vel); |
|
|
|
|
|
|
|
|
while (true) { |
|
|
while (true) { |
|
|