|
|
@ -48,6 +48,7 @@ void ZCanProtocolParser::initialize(ZCanReceiver* cancmder) { |
|
|
|
|
|
|
|
REGFN(step_motor_enable); |
|
|
|
REGFN(step_motor_read_pos); |
|
|
|
REGFN(step_motor_read_enc_pos); |
|
|
|
REGFN(step_motor_easy_rotate); |
|
|
|
REGFN(step_motor_easy_move_by); |
|
|
|
REGFN(step_motor_easy_move_to); |
|
|
@ -336,6 +337,14 @@ int32_t ZCanProtocolParser::step_motor_read_pos(cmdcontxt_t* cxt) { |
|
|
|
cxt->acklen = 4; |
|
|
|
return module->step_motor_read_pos(&ack[0]); |
|
|
|
} |
|
|
|
|
|
|
|
int32_t ZCanProtocolParser::step_motor_read_enc_pos(cmdcontxt_t* cxt) { |
|
|
|
CHECK_AND_GET_MODULE(0); |
|
|
|
int32_t* ack = (int32_t*)cxt->ackbuf; |
|
|
|
cxt->acklen = 4; |
|
|
|
return module->step_motor_read_enc_pos(&ack[0]); |
|
|
|
} |
|
|
|
|
|
|
|
int32_t ZCanProtocolParser::step_motor_easy_rotate(cmdcontxt_t* cxt) { |
|
|
|
CHECK_AND_GET_MODULE(1); |
|
|
|
return module->step_motor_easy_rotate(cxt->params[0]); |
|
|
|