ライブラリ化を行った後

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 kusano kiyoshige

Revision:
65:5e4c2e5494ae
Parent:
64:41dcec6c20bc
Child:
66:1664ee92539d
diff -r 41dcec6c20bc -r 5e4c2e5494ae main.cpp
--- a/main.cpp	Sat Sep 23 10:10:58 2017 +0000
+++ b/main.cpp	Sun Sep 24 01:28:34 2017 +0000
@@ -132,9 +132,9 @@
 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);
@@ -182,14 +182,10 @@
 //cylinder
 void firstmotion()
 {
-    while(interrupt_cylinder_min == 1 || interrupt_sholderleft_max == 1 || interrupt_sholderright_max == 1){
         float cylinder = 0.0;
         float sholderL = 0.0;
         float sholderR = 0.0;
-        led1 = interrupt_sholderleft_max;
-        led2 = interrupt_sholderleft_min;
-        led3 = interrupt_sholderright_max;
-        led4 = interrupt_sholderright_min;
+    while(interrupt_cylinder_min == 1 || interrupt_sholderleft_max == 1 || interrupt_sholderright_max == 1){
         if(interrupt_cylinder_min == 1){
             cylinder = 2.0;
         }else{
@@ -334,7 +330,7 @@
                 break;
             case 2:
                 //rs422.put(id[counter], sbdbt.right_y, 0.0);
-                rs422.put(id[counter], limitf((-1*enc_cylinder.duty_enableWidth(-5.0,5.0)),1.0,-1.0), 0.0);
+                rs422.put(id[counter], limitf((-1*enc_cylinder.duty_enableWidth(-10.0,10.0)),1.0,-1.0), 0.0);
                 counter ++;
                 break;
             case 3: