|
|
@ -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; |
|
|
|