aaa

Files at this revision

API Documentation at this revision

Comitter:
talsl
Date:
Wed Jul 10 09:19:39 2019 +0000
Parent:
1:3c9eaf598f21
Commit message:
nekodesu;

Changed in this revision

wheelUnit.cpp Show annotated file Show diff for this revision Revisions of this file
wheelUnit.h Show annotated file Show diff for this revision Revisions of this file
--- a/wheelUnit.cpp	Wed Jul 10 08:01:51 2019 +0000
+++ b/wheelUnit.cpp	Wed Jul 10 09:19:39 2019 +0000
@@ -13,7 +13,8 @@
 void WheelUnit::move(float x,float y,float turnPower)
 {
     omni.computeXY(x,y,turnPower);
-    for (int i = 0; i < 4; ++i) md[i]->setSpeed(omni.wheel[i] * SPEEDRATE);
+    for (int i = 0; i < 4; ++i) wheel[i] = omni.wheel[i];
+    for (int i = 0; i < 4; ++i) md[i]->setSpeed(wheel[i] * SPEEDRATE);
     print = omni.wheel[0];
     pc.printf("%f\n\r",print);
 }
--- a/wheelUnit.h	Wed Jul 10 08:01:51 2019 +0000
+++ b/wheelUnit.h	Wed Jul 10 09:19:39 2019 +0000
@@ -20,6 +20,7 @@
     ikarashiMDC **md;
     Serial pc;
     float print;
+    float wheel[4];
 };
 
 #endif
\ No newline at end of file