Skip to content

Commit

Permalink
Merge pull request #56 from westonrobot/feature-decoding_set_motion_mode
Browse files Browse the repository at this point in the history
protocol_v2: added CAN_MSG_SET_MOTION_MODE_ID decoding
  • Loading branch information
rdu-weston authored Aug 1, 2024
2 parents 4b19dab + ea87331 commit 3b29043
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/protocol_v2/agilex_msg_parser_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ bool DecodeCanFrameV2(const struct can_frame *rx_frame, AgxMessage *msg) {
1000.0;
break;
}
case CAN_MSG_SET_MOTION_MODE_ID: {
msg->type = AgxMsgSetMotionModeCommand;
SetMotionModeFrame *frame = (SetMotionModeFrame *)(rx_frame->data);
msg->body.motion_mode_msg.motion_mode = frame->motion_mode;
break;
}
case CAN_MSG_LIGHT_COMMAND_ID: {
msg->type = AgxMsgLightCommand;
// parse frame buffer to message
Expand Down

0 comments on commit 3b29043

Please sign in to comment.