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.
Fork of 2015robot_main by
Diff: main_ps3.cpp
- Revision:
- 72:021a14ee970f
- Parent:
- 71:4ebc1c0fcb4e
- Child:
- 73:86b7b82ba997
diff -r 4ebc1c0fcb4e -r 021a14ee970f main_ps3.cpp --- a/main_ps3.cpp Fri Oct 09 12:01:58 2015 +0000 +++ b/main_ps3.cpp Sat Oct 10 00:47:26 2015 +0000 @@ -92,11 +92,26 @@ } if((step==7)&&(x<-100.0)) targ_velocity=0.0,step=8; - if((x>2900.0)&&(CStep==1)&&(!skip)) CStep=2,sendData(1,1); /*nomal*/ - if((x>5850.0)&&(CStep==2)&&(!skip)) CStep=3,sendData(1,2); - if((x>7600.0)&&(CStep==3)&&(!skip)) CStep=4,sendData(1,3); - if((x<6600.0)&&(CStep==4)&&(!skip)) CStep=5,sendData(1,5); - if((x<6100.0)&&(CStep==5)&&(!skip)) CStep=6,sendData(1,4); + if((x>2900.0)&&(CStep==1)) { /*nomal*/ + if(!skip) sendData(1,1); + CStep=2; + } + if((x>5850.0)&&(CStep==2)) { + if(!skip) sendData(1,2); + CStep=3; + } + if((x>7600.0)&&(CStep==3)) { + if(!skip) sendData(1,3); + CStep=4; + } + if((x<6600.0)&&(CStep==4)) { + if(!skip) sendData(1,5); + CStep=5; + } + if((x<6100.0)&&(CStep==5)) { + if(!skip) sendData(1,4); + CStep=6; + } /*if((x>3344.0)&&(CStep==1)) CStep=2,sendData(1,1); if((x>6234.0)&&(CStep==2)) CStep=3,sendData(1,2);