Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
TorqueControl.h
Go to the documentation of this file.
1#ifndef RENSSELAERMOTORSPORT_TORQUE_CONTROL_H
2#define RENSSELAERMOTORSPORT_TORQUE_CONTROL_H
3
4#include "../ControllerSystem.h"
5#include "../../Utils/Constants.h"
6#include "Apps.h"
7
8typedef enum {
17
18typedef struct {
25
33void initTorqueControl(TorqueControl* tc, Apps* apps, int hz, float maxTorque);
34
42
49int setDesiredTorque(ControllerSystem* controller);
50
51#endif // RENSSELAERMOTORSPORT_TORQUE_CONTROL_H
: Contains the logic for the two app sensors.
TorqueStatus
Definition: TorqueControl.h:8
@ TORQUE_OK
Definition: TorqueControl.h:9
@ TORQUE_LOW
Definition: TorqueControl.h:11
@ TORQUE_UNDER_LIMIT
Definition: TorqueControl.h:13
@ TORQUE_SENSOR_ERROR
Definition: TorqueControl.h:14
@ TORQUE_OVER_LIMIT
Definition: TorqueControl.h:12
@ TORQUE_BRAKE_FIGHT
Definition: TorqueControl.h:15
@ TORQUE_RTD
Definition: TorqueControl.h:10
int setDesiredTorque(ControllerSystem *controller)
Sets the desired torque for the Torque Control Actuator.
Definition: TorqueControl.c:27
int startTorqueControl(TorqueControl *tc)
Starts the Torque Control Actuator.
Definition: TorqueControl.c:13
void initTorqueControl(TorqueControl *tc, Apps *apps, int hz, float maxTorque)
Initializes the Torque Control Actuator with initial settings.
Definition: TorqueControl.c:6
Definition: Apps.h:22
ControllerSystem base
Definition: TorqueControl.h:19
float maxAllowedTorque
Definition: TorqueControl.h:22
TorqueStatus status
Definition: TorqueControl.h:23
float desiredTorque
Definition: TorqueControl.h:21