add ranger motion mode setting

This commit is contained in:
wangzheqie
2021-04-22 13:37:28 +08:00
parent 4d0f718231
commit d6c06897d3
7 changed files with 64 additions and 4 deletions

View File

@@ -152,4 +152,18 @@ void AgilexBase::DisableLightControl() {
EncodeCanFrame(&msg, &frame);
can_->SendFrame(frame);
}
} // namespace westonrobot
void AgilexBase::SetMotionMode(uint8_t mode)
{
printf("before set: %d", mode);
AgxMessage msg;
msg.type = AgxMsgSetMotionMode;
msg.body.motion_mode_msg.motion_mode = mode;
// send to can bus
can_frame frame;
EncodeCanFrame(&msg, &frame);
can_->SendFrame(frame);
printf("after set: %d", mode);
}
} // namespace westonrobot