ver CAN

Revision:
5:b43c03ee7f8b
Parent:
2:75153205d6e8
Child:
6:342e3a4f4a8d
diff -r 615ccca78f67 -r b43c03ee7f8b ikarashiMDC.cpp
--- a/ikarashiMDC.cpp	Tue Aug 22 01:55:17 2017 +0000
+++ b/ikarashiMDC.cpp	Tue Aug 29 17:01:45 2017 +0900
@@ -13,7 +13,7 @@
 
 int ikarashiMDC::setSpeed(const double& speed)
 {
-    uint8_t data[4],dataSpeed;
+    uint8_t data[3],dataSpeed;
     //Limiter
     const double cropped_speed = -1 < speed ?
                                   1 > speed ?
@@ -28,7 +28,7 @@
     data[1] = (addr<<5) + motorNum + (mode<<4); //address
     data[2] = dataSpeed;
     //send data
-    for(int i=0; i<4; i++) {
+    for(int i=0; i<3; i++) {
         serial->putc(data[i]);
     }
     return 0;
@@ -41,4 +41,4 @@
         serial->putc(255);
     }
 
-}
\ No newline at end of file
+}