ライブラリ化を行った後

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:
58:6cd46488f59b
Parent:
57:68df771fd8a1
Child:
59:68a73b9d27f5
--- a/main.cpp	Tue Sep 19 04:20:34 2017 +0000
+++ b/main.cpp	Tue Sep 19 04:29:46 2017 +0000
@@ -77,7 +77,8 @@
 Accel v2;
 Accel v3;
 Accel v4;
-Cylinder cylinder(pin_cylinder_on,pin_cylinder_off);
+DigitalOut cylinder_on(pin_cylinder_on);
+DigitalOut cylinder_off(pin_cylinder_off);
 Cyclic sword;
 Cyclic cyclic_cylinder_position;
 DigitalIn interrupt_sholderright_min(pin_interrupt_sholderright_min);
@@ -219,7 +220,14 @@
 }
 void cylinder_cal()
 {
-    cylinder.cyclic(sbdbt.shikaku);     //cylinder ON/OFF
+    //cylinder ON/OFF
+    if(sbdbt.shikaku){
+        cylinder_on = 1;
+        cylinder_off = 0;
+    }else{
+        cylinder_on = 0;
+        cylinder_off = 1;    
+    }
     
     cylinder_event.input(sbdbt.right);
     if(cylinder_event.getRise()) {        //cylinder degset