ver CAN

Revision:
7:a8fcb8df927a
Parent:
2:75153205d6e8
Child:
8:626daa6d81ac
--- a/ikarashiMDC.cpp	Tue Aug 22 01:55:17 2017 +0000
+++ b/ikarashiMDC.cpp	Wed Aug 30 06:55:32 2017 +0000
@@ -9,6 +9,7 @@
     addr = taddr;
     motorNum = tmotorNum;
     mode = tmode;
+    braking = false;
 }
 
 int ikarashiMDC::setSpeed(const double& speed)
@@ -25,7 +26,7 @@
     //printf("%d\n",dataSpeed);
     //set sending data
     data[0] = 255; //header
-    data[1] = (addr<<5) + motorNum + (mode<<4); //address
+    data[1] = (addr<<5) + motorNum + (mode<<4)+(braking<<3); //address
     data[2] = dataSpeed;
     //send data
     for(int i=0; i<4; i++) {