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:
- 17:726b6f53a457
- Parent:
- 14:943e663694c3
- Child:
- 19:ed178d04e11d
--- a/main_ps3.cpp Tue Nov 03 04:33:08 2015 +0000 +++ b/main_ps3.cpp Thu Nov 05 07:43:37 2015 +0000 @@ -50,12 +50,13 @@ #ifdef BLUE //Blue /********************************Nomal Mode*********************************/ - if((step==0)&&((8650.0>x)&&(x>800.0))) { -// targ_sita=0.025; + if((step==0)&&((9000.0>x)&&(x>800.0))) { +// targ_sita=-0.01; targ_sita=0.0; step=1; } - if((step==1)&&(x>8600.0+deff)) { +// if((step==1)&&(x>8600.0+deff)) { + if((step==1)&&(x>9000.0)) { targ_velocity=0.0; direction_controller.setBias(0.0); direction_controller.reset(); @@ -71,11 +72,11 @@ targ_sita=0.0; } // if((step==3)&&(x<2000.0)) { - if((step==3)&&(x<1900.0)) { + if((step==3)&&(x<1400.0)) { targ_sita=PI/4; step=4; } - if((step==4)&&(x<100.0)) { + if((step==4)&&(x<600.0)) { targ_velocity=0.0; step=114; } @@ -321,8 +322,6 @@ if(down) fclose(fp_r); if(b==9) fclose(fp_r); #endif -// mesure_state(); /*位置測定*/ -// move_following(); /*移動制御*/ } else if(!autoflag) { flaga=0; @@ -331,8 +330,8 @@ manualIM920(); /*IM920 button*/ } /***update state***/ -// pc.printf("x:%f,y:%f\r\n",x,y); - pc.printf("a2:%d ,b:%d ,X:%d ,Y:%d\r\n",a2,b,X,Y); + pc.printf("x:%f ,y:%f ,sita:%f ,r:%f\r\n",x,y,sita,Pulses_move_r); +// pc.printf("a2:%d ,b:%d ,X:%d ,Y:%d\r\n",a2,b,X,Y); // wait(RATE); } } \ No newline at end of file