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.
Diff: RS405CB.cpp
- Revision:
- 5:e6208d124ead
- Parent:
- 4:8289dcb78a23
--- a/RS405CB.cpp Thu Dec 12 04:44:52 2019 +0000
+++ b/RS405CB.cpp Thu Dec 12 05:00:22 2019 +0000
@@ -211,7 +211,7 @@
----------------------------------------------------------------------------- */
-void RS405CB::SetSpeed(unsigned char* ID, int* speed);
+void RS405CB::SetSpeed(unsigned char* ID, int* speed)
{
const unsigned char size = sizeof(ID);
unsigned char TxData[8 + 3 * size];
@@ -221,7 +221,7 @@
TxData[1] = 0xAF; //header
TxData[2] = 0x00; // ID -> 0x00
TxData[3] = 0x00; // Flags -> 0x00
- TxData[4] = 0x1E+2; // Addr -> GoalTime
+ TxData[4] = 0x1E + 2; //Addr
TxData[5] = 0x03; // Length -> ID(1Byte) + GoalTime_L,H(2Byte)
TxData[6] = (unsigned char)size; // Count -> Number of Servos