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.
mode.cpp
00001 #include "mode.h" 00002 #include "CAN.h" 00003 00004 // 00005 void Zero(CANMessage * msg){ 00006 msg->data[0] = 0xFF; 00007 msg->data[1] = 0xFF; 00008 msg->data[2] = 0xFF; 00009 msg->data[3] = 0xFF; 00010 msg->data[4] = 0xFF; 00011 msg->data[5] = 0xFF; 00012 msg->data[6] = 0xFF; 00013 msg->data[7] = 0xFE; 00014 WriteAll(); 00015 } 00016 00017 00018 // 进入电机模式 00019 void EnterMotorMode(CANMessage * msg){ 00020 msg->data[0] = 0xFF; 00021 msg->data[1] = 0xFF; 00022 msg->data[2] = 0xFF; 00023 msg->data[3] = 0xFF; 00024 msg->data[4] = 0xFF; 00025 msg->data[5] = 0xFF; 00026 msg->data[6] = 0xFF; 00027 msg->data[7] = 0xFC; 00028 WriteAll(); 00029 } 00030 00031 00032 // 退出电机模式 00033 void ExitMotorMode(CANMessage * msg){ 00034 msg->data[0] = 0xFF; 00035 msg->data[1] = 0xFF; 00036 msg->data[2] = 0xFF; 00037 msg->data[3] = 0xFF; 00038 msg->data[4] = 0xFF; 00039 msg->data[5] = 0xFF; 00040 msg->data[6] = 0xFF; 00041 msg->data[7] = 0xFD; 00042 WriteAll(); 00043 } 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067
Generated on Tue Jul 12 2022 23:32:27 by
1.7.2