ken fuji / P_motor

Dependents:   omuni_a omuni

Files at this revision

API Documentation at this revision

Comitter:
fujikenac
Date:
Mon Oct 23 13:28:50 2017 +0000
Parent:
1:9d893f55d17f
Commit message:
fix roll

Changed in this revision

P_motor.cpp Show annotated file Show diff for this revision Revisions of this file
P_motor.h Show annotated file Show diff for this revision Revisions of this file
--- a/P_motor.cpp	Mon Oct 16 08:12:33 2017 +0000
+++ b/P_motor.cpp	Mon Oct 23 13:28:50 2017 +0000
@@ -65,6 +65,12 @@
     }
 }
 
+void P_motor::direct_controll(double target_)
+{
+    motor = target_;
+    output_reset();
+}
+
 void P_motor::free()
 {
     motor.free();
--- a/P_motor.h	Mon Oct 16 08:12:33 2017 +0000
+++ b/P_motor.h	Mon Oct 23 13:28:50 2017 +0000
@@ -27,6 +27,7 @@
   public:
     P_motor(I2C *i2c_, char addr_);
     P_motor& operator=(double target_);
+    void direct_controll(double target_);
     void run();
     void free();
     void stop();