手動b足回り

Dependents:   kobayashi_rei

Revision:
2:9017bbe177b7
Parent:
1:3c9eaf598f21
Child:
3:01a6eca21b23
--- a/wheelUnit.cpp	Wed Jul 10 08:01:51 2019 +0000
+++ b/wheelUnit.cpp	Thu Jul 11 09:19:29 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);
 }