手動b足回り
Diff: wheelUnit.cpp
- Revision:
- 2:9017bbe177b7
- Parent:
- 1:3c9eaf598f21
- Child:
- 3:01a6eca21b23
diff -r 3c9eaf598f21 -r 9017bbe177b7 wheelUnit.cpp --- 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); }