Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mcp2515 mbed-dev-f303
Diff: MODE/mode.cpp
- Revision:
- 4:2503c88a564f
- Parent:
- 0:d80c66cb1b3a
diff -r 940a9e40d327 -r 2503c88a564f MODE/mode.cpp
--- a/MODE/mode.cpp Wed Jun 30 12:15:37 2021 +0000
+++ b/MODE/mode.cpp Tue Jan 11 02:19:55 2022 +0000
@@ -43,3 +43,27 @@
msg->data[7] = 0xFD;
WriteAll();
}
+// 进入速度模式
+void EnterSPEEDMode(CANMessage * msg){
+ msg->data[0] = 0xFF;
+ msg->data[1] = 0xFF;
+ msg->data[2] = 0xFF;
+ msg->data[3] = 0xFF;
+ msg->data[4] = 0xFF;
+ msg->data[5] = 0xFF;
+ msg->data[6] = 0xFF;
+ msg->data[7] = 0xFA;
+ WriteAll();
+}
+// 进入位置模式
+void EnterPositionMode(CANMessage * msg){
+ msg->data[0] = 0xFF;
+ msg->data[1] = 0xFF;
+ msg->data[2] = 0xFF;
+ msg->data[3] = 0xFF;
+ msg->data[4] = 0xFF;
+ msg->data[5] = 0xFF;
+ msg->data[6] = 0xFF;
+ msg->data[7] = 0xFB;
+ WriteAll();
+}