kani
Dependencies: 2017NHKpin_config FEP omni_wheel PID R1307 ikarashiMDC
\ ̄\ / ̄/ /l \ \ / / lヽ | ヽ ヽ | | / / | \ ` ‐ヽ ヽ ● ● / / ‐ / \ __ l | ||___|| / l __ / \ \ / \/ /\| 人__人 |/\ <ズワイガニ //\| |/\\ //\| ケガニ |/\\ / . \_____/ \ ┏┓ ┏━┓┏┓ ┏┓ ┏┓┏┓ ┏┓ ┏┓┗┛ ┏┓ ┗┓┃┗┛ ┏┛┗━┓ ┃┃┃┃ ┃┃┏━┛┗┓┏┓┏┛┗━┓┃┃┏┓┏┓┏━━━┓ ┗┓┏━┛ ┃┃┗┛ ┃┃┗━┓┏┛┗┛┗┓┏┓┃┗┛┗┛┃┃┗━━━┛ ┏┛┃┏━┓┃┗━━┓┃┃┏━┛┗┓ ┏┛┃┃┃ ┃┃ ┃┏┛┗━┛┗━━┓┃┃┃┃┏┓┏┛ ┗━┛┃┃ ┃┃┏┓ ┃┃┏━━┓┏━━┛┃┃┃┃┗┛┃ ┏┛┃ ┃┃┃┗━━┓ ┗┛┗━━┛┗━━━┛┗┛┗━━┛ ┗━┛ ┗┛┗━━━┛
Diff: bot/bot.cpp
- Revision:
- 55:f9e13797024f
- Parent:
- 54:be0b5d603562
--- a/bot/bot.cpp Fri Dec 01 16:10:23 2017 +0900 +++ b/bot/bot.cpp Fri Dec 22 17:34:28 2017 +0900 @@ -20,7 +20,6 @@ debugSerial(USBTX, USBRX, 115200), faceMode(0) { - debugSerial.printf("OK\r\n"); for(int i = 0; i < 3; i++) { armMotor[i].braking = true; } @@ -54,7 +53,6 @@ void Bot::controllDrive() { if(receiveSuccessed) { - debugSerial.printf("%d\n\r", plane.getRawDegree()); led[1] = !led[1]; if(pad.getNorm(1) > 0.5) { plane.setPoint((pad.getRadian(1) - M_PI / 2) * (180.0 / M_PI)); @@ -65,7 +63,7 @@ -pad.getStick(1), 0, 0, - -pad.getStick(2) / 3.0 // PIDC::calculationResult + -pad.getStick(2) / 3.0 ); } else { quadOmni.moveXY(0, 0, 0); @@ -82,7 +80,6 @@ if(!pad.getButton2(4)) { axis.resetOffset(); - debugSerial.printf("Force RESeT\n\r"); } if((beforestick >= 0.2 && pad.getStick(2) < 0.2) || (beforestick <= -0.2 && pad.getStick(2) > -0.2)) { @@ -186,10 +183,8 @@ { if(receiveSuccessed) { if(!pad.getButton1(2)) { - debugSerial.printf("ROLL+\n\r"); armMotor[ROLL].setSpeed(1.0); } else if(!pad.getButton1(4)) { - debugSerial.printf("ROLL-\n\r"); armMotor[ROLL].setSpeed(-1.0); } if(pad.getButton1(2) && pad.getButton1(4)) { @@ -197,11 +192,9 @@ } if(!pad.getButton2(3)) { - debugSerial.printf("FUKUDA\n\r"); armMotor[SWORD].setSpeed(1.0); } if(!pad.getButton2(2)) { - debugSerial.printf("FUKUDA\n\r"); armMotor[SWORD].setSpeed(-1.0); } if(pad.getButton2(3) && pad.getButton2(2)) armMotor[SWORD].setSpeed(0.0); @@ -209,7 +202,6 @@ slider.slide(pad.getStick(3)); if(!pad.getButton2(1)) { - debugSerial.printf("DESTROYYY\n\r"); armMotor[DESTROY].setSpeed(-1.0); } else if(!pad.getButton1(0)) { armMotor[DESTROY].setSpeed(1.0);