Browse Source

v1009| 步进电机easyrotate使用电机的rotate方法

master
zhaohe 4 months ago
parent
commit
d43d42bbc0
  1. 3
      sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp
  2. 2
      usrc/version.h

3
sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

@ -609,7 +609,8 @@ int32_t StepMotorCtrlModule::do_step_motor_easy_rotate(int32_t direction) {
[this, direction]() {
befor_motor_move();
{
rotate(direction, m_cfg.motor_default_velocity);
// rotate(direction, m_cfg.motor_default_velocity);
m_stepM1->rotate(direction >= 0 ? m_cfg.motor_default_velocity : -m_cfg.motor_default_velocity);
while (true) {
if (m_thread.getExitFlag()) break;

2
usrc/version.h

@ -1,2 +1,2 @@
#pragma once
#define PC_VERSION 1008
#define PC_VERSION 1009
Loading…
Cancel
Save