![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Fork de Timer après le match à 61 points
Fork of Timer by
Diff: main.cpp
- Revision:
- 88:e4de39dd3e2e
- Parent:
- 86:0c5e9ac3d8d8
- Child:
- 89:46730de0d013
--- a/main.cpp Fri May 06 10:05:45 2016 +0200 +++ b/main.cpp Fri May 06 11:25:05 2016 +0000 @@ -18,7 +18,7 @@ int RvalRcapt3 = 0; int Ravance = 1; DigitalIn start(PB_7); -AX12 umbrella(PA_9, PA_10, 1, 250000); +AX12 umbrella(PA_9, PA_10, 2, 250000); /* Debut du programme */ int main(void) @@ -30,16 +30,25 @@ umbrella.setMode(0); umbrella.setMaxTorque(200); umbrella.setGoal(150); - + wait(1); + umbrella.setGoal(200); + wait(1); + umbrella.setGoal(160); + depart(); if (SCouleur == VERT) { - end.attach(&endFonc, 10); - GotoDist(5.5); + end.attach(&endFonc, 90); + GotoDist(8); + GotoArr(8.2); } else if (SCouleur == VIOLET) { - end.attach(&endFonc, 10); + end.attach(&endFonc, 30); + //GotoDist(8.2); + //GotoArr(8.2); + GotoDist(2); + GotoThet(1, GAUCHE); } - else { + else if (SCouleur == NOIR) { TestDist3(2,2); TestThet3(1,1); } @@ -75,6 +84,9 @@ } void endFonc () { - umbrella.setGoal(150); - while (1); + roboclaw.ForwardM1(0); + roboclaw.ForwardM2(0); + wait(1); + umbrella.setGoal(300); + while(1); }