Browse Source

update

master
zhaohe 2 years ago
parent
commit
bb019caee2
  1. 5
      components/step_motor_ctrl_module/zcan_master_step_motor_ctrl_module.cpp

5
components/step_motor_ctrl_module/zcan_master_step_motor_ctrl_module.cpp

@ -1,6 +1,7 @@
#include "sdk\components\zprotocols\errorcode\errorcode.hpp"
#include "zcan_master_step_motor_ctrl_module.hpp"
#include "sdk\components\zprotocols\errorcode\errorcode.hpp"
using namespace iflytop;
#define TAG "StepMotorCtrlModule"
@ -114,7 +115,7 @@ class StepMotorCtrlModule : public I_StepMotorCtrlModule {
virtual int32_t read_pos(int32_t& pos) { //
status_t status;
int32_t err = read_status(status);
if (err != 0) {
if (err == 0) {
pos = status.x;
}
return err;

Loading…
Cancel
Save