|
|
@ -9,7 +9,7 @@ using namespace iflytop; |
|
|
|
|
|
|
|
#define TAG "Eq20ServoMotor"
|
|
|
|
|
|
|
|
void Eq20ServoMotor::init(int moduleid, ModbusBlockHost *modbusBlockHost, int motorid ) { |
|
|
|
void Eq20ServoMotor::init(int moduleid, ModbusBlockHost *modbusBlockHost, int motorid) { |
|
|
|
// this->com = com;
|
|
|
|
m_modbusBlockHost = modbusBlockHost; |
|
|
|
m_deviceId = motorid; |
|
|
@ -240,6 +240,9 @@ int32_t Eq20ServoMotor::module_get_status(int32_t *status) { |
|
|
|
if (!internal_state.data.sbit.is_reach_target) { |
|
|
|
*status = 1; |
|
|
|
} |
|
|
|
if (!internal_state.data.sbit.is_zero_complete) { |
|
|
|
*status = 1; |
|
|
|
} |
|
|
|
return 0; |
|
|
|
} |
|
|
|
int32_t Eq20ServoMotor::module_get_error(int32_t *iserror) { |
|
|
@ -263,8 +266,7 @@ int32_t Eq20ServoMotor::module_writeio(int32_t io) { return err::koperation_not_ |
|
|
|
|
|
|
|
int32_t Eq20ServoMotor::module_read_adc(int32_t adcindex, int32_t *adc) { return err::koperation_not_support; } |
|
|
|
|
|
|
|
int32_t Eq20ServoMotor::motor_enable(int32_t varenable) { |
|
|
|
return enable(varenable); } |
|
|
|
int32_t Eq20ServoMotor::motor_enable(int32_t varenable) { return enable(varenable); } |
|
|
|
|
|
|
|
int32_t Eq20ServoMotor::motor_rotate(int32_t direction, int32_t motor_velocity, int32_t acc) { return err::koperation_not_support; } |
|
|
|
int32_t Eq20ServoMotor::motor_move_by(int32_t distance, int32_t motor_velocity, int32_t acc) { return err::koperation_not_support; } |
|
|
|