|
|
@ -41,6 +41,7 @@ void ZCanProtocolParser::initialize(IZCanReceiver* cancmder) { |
|
|
|
REGFN(step_motor_read_io_index_in_stm32); |
|
|
|
REGFN(step_motor_set_subdevice_reg); |
|
|
|
REGFN(step_motor_get_subdevice_reg); |
|
|
|
REGFN(step_motor_read_pos_and_enc_pos); |
|
|
|
|
|
|
|
REGFN(mini_servo_enable); |
|
|
|
REGFN(mini_servo_read_pos); |
|
|
@ -334,6 +335,12 @@ int32_t ZCanProtocolParser::step_motor_get_subdevice_reg(cmdcontxt_t* cxt) { |
|
|
|
cxt->acklen = 4; |
|
|
|
return module->step_motor_get_subdevice_reg(cxt->params[0], ack); |
|
|
|
} |
|
|
|
int32_t ZCanProtocolParser::step_motor_read_pos_and_enc_pos(cmdcontxt_t* cxt) { |
|
|
|
CHECK_AND_GET_MODULE(0); |
|
|
|
int32_t* ack = (int32_t*)cxt->ackbuf; |
|
|
|
cxt->acklen = 8; |
|
|
|
return module->step_motor_read_pos_and_enc_pos(&ack[0], &ack[1]); |
|
|
|
} |
|
|
|
|
|
|
|
#undef MODULE_CLASS
|
|
|
|
#define MODULE_CLASS ZIMiniServo
|
|
|
|