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: mbed HX711 MotorModuleExample_copy
Diff: MotorModule/MotorModule.cpp
- Revision:
- 5:a2e3d0213315
- Parent:
- 2:36a254d3dbf3
--- a/MotorModule/MotorModule.cpp Thu Aug 08 20:03:14 2019 +0000
+++ b/MotorModule/MotorModule.cpp Mon Dec 09 23:41:16 2019 +0000
@@ -96,3 +96,16 @@
motor->txMsg.data[7] = 0xFD;
can->write(motor->txMsg);
}
+
+void zero_motor(MotorStruct * motor, CAN * can)
+{
+ motor->txMsg.data[0] = 0xFF;
+ motor->txMsg.data[1] = 0xFF;
+ motor->txMsg.data[2] = 0xFF;
+ motor->txMsg.data[3] = 0xFF;
+ motor->txMsg.data[4] = 0xFF;
+ motor->txMsg.data[5] = 0xFF;
+ motor->txMsg.data[6] = 0xFF;
+ motor->txMsg.data[7] = 0xFE;
+ can->write(motor->txMsg);
+}
\ No newline at end of file