main
Dependents: 00_yotsuba 200_yotsuba_21 200_yotuba_21_uiChange
Diff: robot.cpp
- Revision:
- 7:dcc0faa86da7
- Parent:
- 5:f5e79163d0eb
- Child:
- 8:713bbc1fb58f
diff -r f5e79163d0eb -r dcc0faa86da7 robot.cpp --- a/robot.cpp Sat Feb 01 03:02:18 2020 +0000 +++ b/robot.cpp Sun Feb 02 04:28:14 2020 +0000 @@ -45,19 +45,19 @@ theta = sensor.ballAngle * ballExtra * PI / 180.0; spin_power = spin.compute(); if (sensor.ballKeep) { - drib.setspeed(0.5); +// drib.setspeed(0.5); if(dip1) { - shot.outPut(); - if(!sensor.bluex) omni.computeCircular(1,0, spin_power); - else omni.computeCircular(sensor.blueRange,PI / 180.0 * sensor.blueAngle, spin_power); +// shot.outPut(); + /*if(!sensor.bluex)*/ omni.computeCircular(1,0,0/* spin_power*/); +// else omni.computeCircular(sensor.blueRange,PI / 180.0 * sensor.blueAngle, spin_power); } else { - shot.outPut(); - if(!sensor.yellowx) omni.computeCircular(1,0, spin_power); - else omni.computeCircular(sensor.yellowRange,PI / 180.0 * sensor.yellowAngle, spin_power); +// shot.outPut(); + /*if(!sensor.yellowx)*/ omni.computeCircular(1,0,0/* spin_power*/); +// else omni.computeCircular(sensor.yellowRange,PI / 180.0 * sensor.yellowAngle, spin_power); } } else @@ -94,6 +94,8 @@ motor[2]->setSpeed(-omni2wheel); motor[3]->setSpeed(omni.wheel[3]); // motor[3]->setSpeed(-omni3wheel); + shot.outPut(); + } else { motor[0]->setSpeed(0); motor[1]->setSpeed(0);