Wheel control software for satellite microcontroller running the motors on the Karbor
Dependencies: mbed ros_lib_melodic
Diff: src/MotorControl.h
- Revision:
- 5:44b2454a5eea
- Parent:
- 3:4b6080e86761
- Child:
- 6:ed47deb76adf
--- a/src/MotorControl.h Mon May 31 16:47:02 2021 +0000 +++ b/src/MotorControl.h Tue Jun 08 15:04:33 2021 +0000 @@ -10,7 +10,6 @@ * */ - #include "mbed.h" #include "encoder.h" #include "motor.h" @@ -40,7 +39,7 @@ public: // Constructor takes encoder pins and constants, and a motor object and contorller gains - MotorControl(PinName a, PinName b, PinName i, int r, bool c, double p, motor* m, double ms, double kp, double ti, double ec); + MotorControl(PinName a, PinName b, int r, bool c, double p, motor* m, double ms, double kp, double ti, double diameter); void setSpeed(double s); // Set the speed of the wheel void drive(void); // Drive at set speet @@ -48,7 +47,7 @@ void driveManual(void); // Drive at set speed in open loop void samplecall(void); // Sample encoder and update read speed value void setK(double k); // Set gain (used for Z-N tuning - void start(void); // This function is overridden to avoid bugs + //void start(void); // This function is overridden to avoid bugs double getOutput(void); // Returns current duty cycle bool checkFlag(void); // Check whether max out flag is set };