Browse Source

update

master
zhaohe 1 year ago
parent
commit
234f88f7bd
  1. 2
      components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

2
components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

@ -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) {

Loading…
Cancel
Save