13 #ifndef POSITION_CONTROL_H_ 14 #define POSITION_CONTROL_H_ void reset_controller_error(void)
Resets controller error on both controllers to be zero.
Definition: PositionControl.c:229
int get_desired_angle(int motor)
Gets desired angle for a given motor.
Definition: PositionControl.c:98
void set_position_gains(void)
Sets position gains on the Tiva microcontroller by reading from UART.
Definition: PositionControl.c:68
void get_position_gains(void)
Gets position gains on the Tiva microcontroller by reading to UART.
Definition: PositionControl.c:57
void MotorTimerInit(void)
This function sets up the timer interrupt for position control.
Definition: PositionControl.c:41
void PID_Controller(int reference, int actual, int motor)
Calculates pwm to send to the motor drivr.
Definition: PositionControl.c:192
Definition: PositionControl.h:16
void setDecogging(void)
Turn on/off decogging by setting global variable.
Definition: PositionControl.c:257
int actual
Definition: PositionControl.h:22
int u
Definition: PositionControl.h:24
int Edot
Definition: PositionControl.h:20
int desired
Definition: PositionControl.h:21
int decog_motor(int x, int motor)
Motor decogging to smooth output of motor.
Definition: PositionControl.c:242
int Eint
Definition: PositionControl.h:19
int Enew
Definition: PositionControl.h:17
void load_position_trajectory(int motor)
Loads position trajectory for a given motor over UART.
Definition: PositionControl.c:113
int raw
Definition: PositionControl.h:23
void reset_pos(void)
Resets desired position to 0 counts.
int Eold
Definition: PositionControl.h:18
void set_desired_angle(int angle, int motor)
Sets desired angle for a given motor.
Definition: PositionControl.c:84
void Timer1IntHandler(void)
The interrupt handler for position control.
Definition: PositionControl.c:128