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:
- 37:75fcd28f48c7
- Parent:
- 36:b8954b13a6d5
- Child:
- 38:f4e9893641ac
diff -r b8954b13a6d5 -r 75fcd28f48c7 autoMode.h --- a/autoMode.h Sun Nov 15 00:30:44 2015 +0000 +++ b/autoMode.h Sun Nov 15 11:45:29 2015 +0000 @@ -49,13 +49,13 @@ dpcount=0.0; direction_controller.setBias(0.0); #ifdef BLUE - sendData(5,71); //over + sendData(5,70); //over // sendData(5,68); //over wait(0.05); - sendData(4,71); //front + sendData(4,70); //front // sendData(4,68); //front wait(0.05); - sendData(6,12); //middle + sendData(6,14); //middle // sendData(6,7); //middle stateR = 69; stateL = 69; @@ -82,14 +82,13 @@ dpcount=0.0; direction_controller.setBias(0.0); #ifdef BLUE -// sendData(5,65); //right - sendData(5,69); //right + sendData(5,67); +// sendData(5,77); //over cylinder4 wait(0.05); -// sendData(4,65); //left - sendData(4,69); //left + sendData(4,75); +// sendData(4,75); //front wait(0.05); -// sendData(6,10); //middle - sendData(6,12); //middle + sendData(6,1); //middle stateR = 69; stateL = 69; #else @@ -106,7 +105,40 @@ flaga = 1; } } - else if(b==1){ + if((b==8)&&(!flaga)){ //Middle Start + if(edge8){ + edge6=0; + resetState(1); + flagf=1; + spcount=0.0; + dpcount=0.0; + direction_controller.setBias(0.0); +#ifdef BLUE + sendData(5,69); //over +// sendData(5,69); //over + wait(0.05); + sendData(4,70); //front +// sendData(4,71); //front + wait(0.05); + sendData(6,11); //middle +// sendData(6,7); //middle + stateR = 69; + stateL = 69; +#else + sendData(5,69); //right + wait(0.05); + sendData(4,69); //left + wait(0.05); + sendData(6,10); //middle + stateR = 69; + stateL = 69; +#endif + step = 0; + CStep = 4; + flaga = 1; + } + } + /*else if(b==1){ if(edge1){ edge1=0; sendData(1,5); @@ -129,7 +161,7 @@ edge4=0; sendData(1,8); } - } + }*/ /*if(a2){ skip = 1; }