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: main_ps3.cpp
- Revision:
- 27:88863fab46c0
- Parent:
- 26:760f1bce8214
- Child:
- 29:460e49e37048
--- a/main_ps3.cpp Sun Nov 08 10:56:27 2015 +0000 +++ b/main_ps3.cpp Mon Nov 09 11:33:13 2015 +0000 @@ -40,15 +40,15 @@ sendData(7,0); while(1) { if(autoflag){ + autoIM920(); /*IM920 button*/ #ifdef BLUE - autoIM920(); /*IM920 button*/ /********************************Nomal Mode*********************************/ - if((step==0)&&((9000.0>x)&&(x>800.0))) { - targ_sita=-0.07; + if((step==0)&&((10000.0>x)&&(x>800.0))) { + targ_sita=-0.06; // targ_sita=0.0; step=1; } - if((step==1)&&(x>9000.0)) { + if((step==1)&&(x>10000.0)) { targ_velocity=0.0; /*direction_controller.setBias(0.0); direction_controller.reset();*/ @@ -62,7 +62,7 @@ spcount=0.0; flagf=0; // targ_sita=0.0; - targ_sita=-0.07; + targ_sita=-0.06; } if((step==3)&&(x<1400.0)) { targ_sita=PI/4; @@ -86,19 +86,23 @@ if(!skip) sendData(1,2); CStep=4; } - if((x<8500.0)&&(CStep==4)) { - if(!skip) sendData(1,5); + if((x>10000.0)&&(CStep==4)) { CStep=5; } - if((x<6800.0)&&(CStep==5)) { - if(!skip) sendData(1,6); + if((x<9650.0)&&(CStep==5)) { + if(!skip) sendData(1,5); CStep=6; } - if((x<4900.0)&&(CStep==6)) { - if(!skip) sendData(1,4); + if((x<7450.0)&&(CStep==6)) { + if(!skip) sendData(1,6); CStep=7; } - if((x<1000.0)&&(CStep==7)){ + if((x<5300.0)&&(CStep==7)) { + if(!skip) sendData(1,4); + CStep=8; + } + + if((x<1000.0)&&(CStep==8)){ sendData(7,0); CStep=114; }