This library is for RS405CB that is controlled by RS-485
Revision 5:e6208d124ead, committed 2019-12-12
- Comitter:
- FumiyaKoike
- Date:
- Thu Dec 12 05:00:22 2019 +0000
- Parent:
- 4:8289dcb78a23
- Commit message:
- Fix the issure
Changed in this revision
| RS405CB.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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