
主導機 mbed用のプログラムです 改良しました
Dependencies: mbed
Fork of F3RC_syudou_master by
Revision 22:e88dd3acec2b, committed 2017-08-23
- Comitter:
- yuto17320508
- Date:
- Wed Aug 23 16:41:56 2017 +0000
- Parent:
- 21:d9f5b74d5034
- Commit message:
- a
Changed in this revision
User.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/User.cpp Wed Aug 23 14:29:18 2017 +0000 +++ b/User.cpp Wed Aug 23 16:41:56 2017 +0000 @@ -50,6 +50,7 @@ //回転の比 double roll_spd=0.5; +//モーターの動作 void motor_act() { if(M1 >=0) { @@ -59,7 +60,6 @@ motor_f_1=0; motor_f_2=-M1; } - if(M2 >=0) { motor_l_1=M2; motor_l_2=0; @@ -67,7 +67,6 @@ motor_l_1=0; motor_l_2=-M2; } - if(M3 >=0) { motor_r_1=M3; motor_r_2=0; @@ -76,14 +75,13 @@ motor_r_2=-M3; } - - } +//ジョイスティック入力値の偏角 double sita; +//関数代入用の角度調整 double sita_2; - void UserLoopSetting() { spi.format(8,3); @@ -182,11 +180,8 @@ cs = 0; spi. write(send); cs = 1; - // printf("%d\r\n",send); - - - -//オムニホイールのプログラム + // printf("%d\r\n",send + //オムニホイールのプログラム if(LSX>=bound_m && LSX<=bound_p && LSY>=bound_m && LSY<=bound_p) { M1=0; M2=0;