Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: autoMode.h
- Revision:
- 23:26f9483439fe
- Parent:
- 21:bdf8ac5c200c
- Child:
- 24:6d2573d6f2b6
--- a/autoMode.h Fri Nov 06 11:35:39 2015 +0000 +++ b/autoMode.h Sat Nov 07 01:03:46 2015 +0000 @@ -58,101 +58,11 @@ stateR = 69; stateL = 69; #endif - wait(0.05); step = 0; CStep = 1; flaga = 1; } } - else if((b==5)&&(!flaga)){ /*middle start*/ - if(edge5){ - edge5=0; - resetState(); - flagf = 1; - spcount=0.0; - direction_controller.setBias(0.0); -// targ_velocity=speed; -#ifdef BLUE - sendData(5,60); //right - wait(0.05); - sendData(4,60); //left - wait(0.05); - sendData(6,49); //middle - stateR = 60; - stateL = 61; -#else - sendData(5,59); //right - wait(0.05); - sendData(4,59); //left - wait(0.05); - sendData(6,49); //middle - stateR = 59; - stateL = 59; -#endif - wait(0.05); - step = 5; - CStep = 7; - flaga = 1; - } - } - else if((b==8)&&(!flaga)){ /*opponents start*/ - if(edge8){ - edge8=0; - resetState(); - direction_controller.setBias(0.0); -// targ_velocity = speed; -#ifdef BLUE - sendData(5,69); //right - wait(0.05); - sendData(4,69); //left - wait(0.05); - sendData(6,69); //middle - stateR = 71; - stateL = 71; -#else - sendData(4,73); //left - wait(0.05); - sendData(5,73); //right - wait(0.05); - sendData(6,69); //middle - stateR = 71; - stateL = 72; -#endif - wait(0.05); - step=114; - CStep=114; - OpStart.attach(&OpponentsStart,2.2); -// OpStart.attach(&OpponentsStart,2.0); - } - } - else if(b==1){ /*L down*/ - if(edge1){ - edge1=0; - if(stateL!=1) stateL--; - sendData(4,stateL); - } - } - else if(b==2){ /*L up*/ - if(edge2){ - edge2=0; - if(stateL!=MAX_VALUE) stateL++; - sendData(4,stateL); - } - } - else if(b==3){ /*R down*/ - if(edge3){ - edge3=0; - if(stateR!=1) stateR--; - sendData(5,stateR); - } - } - else if(b==4){ /*R up*/ - if(edge4){ - edge4=0; - if(stateR!=MAX_VALUE) stateR++; - sendData(5,stateR); - } - } /*if(a2){ skip = 1; }