タコ 腕

Dependencies:   2017NHKpin_config FEP ikarashiMDC

Fork of NHK2017_octopus2 by NagaokaRoboticsClub_mbedTeam

Revision:
55:ccf2ac8f6f32
Parent:
54:857390145ac4
--- a/bot/bot.cpp	Thu Nov 23 14:59:59 2017 +0900
+++ b/bot/bot.cpp	Tue Nov 28 17:58:04 2017 +0900
@@ -8,11 +8,8 @@
     tentacle(&RS485Controller, &RS485),
     nishijoSword(&RS485Controller, &RS485),
     nishijo(&RS485Controller, &RS485),
-    receiveSuccessed(0),
-    debugSerial(USBTX, USBRX, 115200)
+    receiveSuccessed(0)
 {
-    debugSerial.printf("OK\r\n");
-
     tentacle.stop();
     nishijoSword.stop();
     nishijo.stop();
@@ -22,9 +19,9 @@
 void Bot::confirmPad()
 {
     receiveSuccessed = pad.receiveState();
-    if(!pad.getButton2(3) && !pad.getButton2(0)) {
-        powerSwitch = 0;
-    }
+    // if(!pad.getButton2(3) && !pad.getButton2(0)) {
+    //     powerSwitch = 0;
+    // }
     if(!receiveSuccessed) {
         tentacle.stop();
         nishijoSword.stop();
@@ -44,8 +41,8 @@
     if (!pad.getButton2(1)) nishijoSword.move(WIND_UP_SPEED);
     if(pad.getButton2(0) && pad.getButton2(1))  nishijoSword.move(0);
 
-    if (!pad.getButton2(3)) nishijo.move(-SWORD_SPEED);
-    if (!pad.getButton2(2)) nishijo.move(SWORD_SPEED);
+    if (!pad.getButton2(2)) nishijo.move(-SWORD_SPEED);
+    if (!pad.getButton2(3)) nishijo.move(SWORD_SPEED);
     if(pad.getButton2(2) && pad.getButton2(3))  nishijo.move(0);
   } else {
     tentacle.stop();
@@ -53,14 +50,3 @@
     nishijo.stop();
   }
 }
-
-void Bot::checkConnection()
-{
-  if(receiveSuccessed == 1) debugSerial.printf("ON\r\n");
-  else  debugSerial.printf("OFF");
-}
-
-void Bot::checkReceiveData()
-{
-  debugSerial.printf("%f %f %f %f\r\n",pad.getStick(0),pad.getStick(1),pad.getStick(2),pad.getStick(3));
-}