Octopus!!
Dependencies: 2017NHKpin_config FEP HMC6352 PID QEI R1307 ikarashiMDC omni_wheel
Fork of KANIv3 by
Diff: bot/bot.cpp
- Revision:
- 35:4608938f67c5
- Parent:
- 32:b619c7787dc3
- Child:
- 36:c1398ea8f604
--- a/bot/bot.cpp Sat Oct 07 11:36:43 2017 +0900 +++ b/bot/bot.cpp Sat Oct 07 19:13:33 2017 +0900 @@ -75,8 +75,9 @@ float moment = 0; static float beforestick = pad.getStick(2); - if(!pad.getButton2(2)) { + if(!pad.getButton1(6)) { axis.resetOffset(); + debugSerial.printf("Force RESeT\n\r"); } if((beforestick >= 0.5 && pad.getStick(2) < 0.5) || (beforestick <= -0.5 && pad.getStick(2) > -0.5)) { @@ -161,14 +162,16 @@ void Bot::controllMech() { if(receiveSuccessed) { - if(!pad.getButton1(6)) { + if(!pad.getButton1(0)) { + debugSerial.printf("FUKUDA\n\r"); armMotor[SWORD].setSpeed(0.6); } - if(pad.getButton1(6)) armMotor[SWORD].setSpeed(0.0); + if(pad.getButton1(0)) armMotor[SWORD].setSpeed(0.0); slider.slide(pad.getStick(3)); if(!pad.getButton2(1)) { + debugSerial.printf("DESTROYYY\n\r"); armMotor[DESTROY].setSpeed(-1.0); } else { armMotor[DESTROY].setSpeed(0.0);