![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ライブラリ化を行った後
Dependencies: QEI accelerator bit_test cyclic_io cyclic_var cylinder event_var limit mbed mecanum motor_drive pid pid_encoder rs422_put sbdbt servo
Fork of 17robo_Practice1 by
Diff: main.cpp
- Revision:
- 63:7e7d0cbc06c3
- Parent:
- 59:68a73b9d27f5
--- a/main.cpp Thu Sep 21 05:59:49 2017 +0000 +++ b/main.cpp Fri Sep 22 10:07:33 2017 +0000 @@ -132,17 +132,17 @@ void setup() { wait(2.0); - bno055.begin(); +// bno055.begin(); wait(1.0); - bno055.firstRead(); +// bno055.firstRead(); pc.baud(pc_baud); sbdbt.begin(sbdbt_baud); rs422.begin(rs422_baud); - firstmotion(); - cylinder_pos_num = 2; //セットアップタイムでの初期装填のため +// firstmotion(); +// cylinder_pos_num = 2; //セットアップタイムでの初期装填のため output_timer.attach(&output, output_period); yaw_pid.setup(yaw_Kp, yaw_Ki, yaw_Kd); - mecanum.setupdeg(bno055.getYawRad()); //基盤が前後逆の場合+180 +// mecanum.setupdeg(bno055.getYawRad()); //基盤が前後逆の場合+180 v1.setup(acceleration,output_period); v2.setup(acceleration,output_period); v3.setup(acceleration,output_period); @@ -309,7 +309,7 @@ //led1 = sbdbt.get_pairingState(); if(sbdbt.up)cylinder_origin_flag = 1; if(sbdbt.left)bno055.yaw_origin(); - cylinder_reload.cyclic(sbdbt.down); + cylinder_reload.cyclic(sbdbt.down&&(interrupt_cylinder_min==0)); static int counter; static float mecanumV1, mecanumV2, mecanumV3, mecanumV4;