ver CAN
Diff: ikarashiMDC.cpp
- Revision:
- 8:626daa6d81ac
- Parent:
- 6:342e3a4f4a8d
- Parent:
- 7:a8fcb8df927a
- Child:
- 9:12ea2a3883bb
--- a/ikarashiMDC.cpp Tue Aug 29 17:03:29 2017 +0900 +++ b/ikarashiMDC.cpp Thu Aug 31 18:06:19 2017 +0900 @@ -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<3; i++) {