PID motor controll for the biorobotics project.

Dependencies:   FastPWM QEI

Dependents:   PID_example Motor_calibration Demo_mode Demo_mode ... more

Revision:
13:9be1857401f8
Parent:
12:2c65bcbebf8a
Child:
14:e5fc69651b1d
--- a/motor.h	Wed Oct 31 16:19:09 2018 +0000
+++ b/motor.h	Thu Nov 01 12:55:32 2018 +0000
@@ -36,8 +36,8 @@
     
     double target_angle;
     
-    // Maximum pwm fraction that this motor is allowed to output.
-    double max_pwm_fraction;
+    // Maximum speed [0 - 1.0].
+    double max_speed;
     
     // For debugging purposes;
     Serial* pc;
@@ -56,8 +56,8 @@
     // On top of the gear box in the motor.
     void set_extra_reduction_ratio(double ratio);
     
-    void set_max_pwm_fraction(double fraction) {
-        max_pwm_fraction = fraction;
+    void set_max_speed(double fraction) {
+        max_speed = fraction;
     };
     
     // Starts the motor controller with the specified update period.