Vehicle Control Unit 0.01
This is the c library for controlling the car.
|
Go to the source code of this file.
Functions | |
void | initTorqueControl (TorqueControl *tc, int hz, float maxTorque) |
Initializes the Torque Control Actuator with initial settings. More... | |
int | startTorqueControl (TorqueControl *tc) |
void | setDesiredTorque (TorqueControl *tc, float torque) |
Sets the desired torque for the Torque Control Actuator. More... | |
void | setActualTorque (TorqueControl *tc, float torque) |
void | updateTorqueControl (void *tc) |
Updates the Torque Control Actuator based on sensor inputs and calculations. More... | |
TorqueStatus | checkTorqueLimits (TorqueControl *tc) |
Checks if the actual torque is within the defined limits and desired range. More... | |
int | torqueSafetyCheck (void *tc) |
Checks the safety of the torque with multiple monitors. More... | |
TorqueStatus checkTorqueLimits | ( | TorqueControl * | tc | ) |
Checks if the actual torque is within the defined limits and desired range.
TODO: move into torque police
tc | A pointer to the TorqueControl structure. |
Definition at line 58 of file TorqueControl.c.
void initTorqueControl | ( | TorqueControl * | tc, |
int | hz, | ||
float | maxTorque | ||
) |
Initializes the Torque Control Actuator with initial settings.
tc | A pointer to the TorqueControl structure. |
hz | Rate at which the sensor is called (in hz). |
maxTorque | The maximum torque limit set for the system (in Nm). |
Definition at line 4 of file TorqueControl.c.
void setActualTorque | ( | TorqueControl * | tc, |
float | torque | ||
) |
Definition at line 39 of file TorqueControl.c.
void setDesiredTorque | ( | TorqueControl * | tc, |
float | torque | ||
) |
Sets the desired torque for the Torque Control Actuator.
tc | A pointer to the TorqueControl structure. |
torque | The desired torque to be set (in Nm). |
Definition at line 27 of file TorqueControl.c.
int startTorqueControl | ( | TorqueControl * | tc | ) |
Definition at line 14 of file TorqueControl.c.
int torqueSafetyCheck | ( | void * | tc | ) |
Checks the safety of the torque with multiple monitors.
tc | A pointer to the TorqueControl structure. |
Definition at line 76 of file TorqueControl.c.
void updateTorqueControl | ( | void * | tc | ) |
Updates the Torque Control Actuator based on sensor inputs and calculations.
tc | A pointer to the TorqueControl structure. |
Definition at line 43 of file TorqueControl.c.