1

Dependencies:   mbed-dev-f303

Revision:
2:e85ebf401989
Parent:
0:d80c66cb1b3a
--- a/MODE/mode.cpp	Tue Nov 17 11:32:58 2020 +0000
+++ b/MODE/mode.cpp	Thu Nov 18 03:14:26 2021 +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();
+}
\ No newline at end of file