Octopus!!

Dependencies:   2017NHKpin_config FEP HMC6352 PID QEI R1307 ikarashiMDC omni_wheel

Fork of KANIv3 by NagaokaRoboticsClub_mbedTeam

Branch:
develop1
Revision:
16:50651ff960b9
Parent:
15:9aa11febe517
Child:
17:79fa65706f92
diff -r 9aa11febe517 -r 50651ff960b9 bot/bot.cpp
--- a/bot/bot.cpp	Sun Sep 17 00:53:01 2017 +0900
+++ b/bot/bot.cpp	Mon Sep 25 18:15:43 2017 +0900
@@ -34,7 +34,9 @@
 void Bot::confirmAll()
 {
     receiveSuccessed = pad.receiveState();
-if(!pad.getButton2(3)) powerSwitch = 0;
+    if(!pad.getButton2(3) && !pad.getButton2(0)) {
+        powerSwitch = 0;
+    }
     led[0] = receiveSuccessed;
     if(!receiveSuccessed) {
         quadOmni.moveXY(0, 0, 0);
@@ -110,15 +112,16 @@
 //        if(!pad.getButton1(4)) motor.shakeHead(-ARM_MAX_SPEED);
 //        if(pad.getButton1(3) && pad.getButton1(4)) motor.shakeHead(0);
 //
-        if(!pad.getButton1(5)) armMotor[SWORD].setSpeed(0.6);
-        if(!pad.getButton1(6)) armMotor[SWORD].setSpeed(-0.6);
-        if(pad.getButton1(5) && pad.getButton1(6)) armMotor[SWORD].setSpeed(-0.0);
+        if(!pad.getButton1(6)) {
+            armMotor[SWORD].setSpeed(0.6);
+        }
+        if(pad.getButton1(6)) armMotor[SWORD].setSpeed(0.0);
 
         if(!pad.getButton1(3)) slider.slide(1.0);
         if(!pad.getButton1(4)) slider.slide(-1.0);
         if(pad.getButton1(3) && pad.getButton1(4)) slider.slide(0.0);
 
-        if(!pad.getButton2(4)) {
+        if(!pad.getButton2(1)) {
             armMotor[DESTROY].setSpeed(-1.0);
         } else {
             armMotor[DESTROY].setSpeed(0.0);