手動bのほぼ全部
Dependents: kobayashi_rei 2019BSyudo Bsyudo 2019Bsyudo
Diff: states.cpp
- Revision:
- 2:860eb70d3656
- Parent:
- 1:38dd7564c15f
- Child:
- 3:2b909340be04
--- a/states.cpp Wed Jul 10 07:38:28 2019 +0000 +++ b/states.cpp Wed Jul 10 08:23:52 2019 +0000 @@ -36,10 +36,11 @@ } stickRad = PI - pad.getRadian(0) + (nowAngle * (PI / 180)); norm = pad.getNorm(0); + if(b[6]) norm = 0.25; X = norm * cos(stickRad); Y = norm * sin(stickRad); - if(b3[0] == 1) state++; - if(b3[1] == 1) state--; + if(b3[9] == 1) state++; + if(b3[10] == 1) state--; /* *move.tellState(方角)でロボの方角 @@ -66,7 +67,6 @@ emStop = true; tellAngle(); tellPad(); -// tellState(); turnPower = anglePID.compute(); omni.move(X, Y, -turnPower); }