Octopus!!

Dependencies:   2017NHKpin_config FEP HMC6352 PID QEI R1307 ikarashiMDC omni_wheel

Fork of KANIv3 by NagaokaRoboticsClub_mbedTeam

Revision:
29:41f6fc4c8962
Parent:
28:676330f1d186
Child:
32:b619c7787dc3
--- a/bot/bot.cpp	Tue Oct 03 19:15:00 2017 +0900
+++ b/bot/bot.cpp	Thu Oct 05 20:09:43 2017 +0900
@@ -71,6 +71,7 @@
 
 void Bot::controllDrive2()
 {
+    PIDC::confirm();
     float moment = 0;
     static float beforestick = pad.getStick(2);
 
@@ -84,20 +85,19 @@
     }
 
     if(pad.getStick(2) > 0.5 || pad.getStick(2) < -0.5) {
-        moment = pad.getStick(2) / 4.0;
-        PIDC::confirm();
-    }
-    if(fabs(pad.getStick(2)) < 0.5) {
-        PIDC::confirm();
+        moment = pad.getStick(2) / 2.0;
+    } else  {
         moment = PIDC::calculationResult;
     }
 
     if(receiveSuccessed) {
         led[1] = !led[1];
         quadOmni.moveCircular(
-            pad.getNorm(0) / 2.0,
+            pad.getNorm(0),
             pad.getRadian(0) - PIDC::planeCurrentDegree / 10.0 * (M_PI / 180.0) + M_PI,
-            moment
+            0.5,
+            0.5,
+            -moment
         );
     } else {
         quadOmni.moveXY(0, 0, 0);