PID motor controll for the biorobotics project.

Dependencies:   FastPWM QEI

Dependents:   PID_example Motor_calibration Demo_mode Demo_mode ... more

Revision:
10:d50c4957a193
Parent:
7:eb8787e7a5f5
Child:
12:2c65bcbebf8a
diff -r 48a0b4a67283 -r d50c4957a193 motor.h
--- a/motor.h	Wed Oct 31 09:12:28 2018 +0000
+++ b/motor.h	Wed Oct 31 10:38:38 2018 +0000
@@ -30,6 +30,10 @@
     // On top of the gear box in the motor.
     double extra_reduction_ratio;
     
+    // How much our rotation frame is turned with respect to the "0" value
+    // of the encoder.
+    double rotation_frame_offset;
+    
     double target_angle;
     
     // For debugging purposes;
@@ -54,8 +58,8 @@
     // Stops the motor immediately.
     void stop();
     
-    // Makes the current angle the new 0 point.
-    void set_current_angle_as_zero();
+    // Defines the current angle to be the given amount of radians.
+    void define_current_angle_as_x_radians(double radians);
     
     // Returns the current angle of the motor.
     double get_current_angle();