Go to the source code of this file.
◆ checkRTD()
int checkRTD |
( |
void * |
rtd | ) |
|
Checks if RTD is in ready to drive state.
- Parameters
-
rtd | A pointer to the RTD structure. |
- Returns
- _SUCCESS if the RTD is ready to drive, _FAILURE otherwise.
Definition at line 77 of file RTD.c.
77 {
80 printf("RTD is ready to drive\r\n");
82 }
84}
◆ initRTD()
Initializes the RTD Actuator with initial settings.
- Parameters
-
rtd | A pointer to the RTD structure. |
hz | Rate at which the sensor is called (in hz). |
Definition at line 6 of file RTD.c.
6 {
11
15
21}
void initControllerSystem(ControllerSystem *controller, const char *name, int hz, ControllerType type, int(*updateController)(ControllerSystem *controller), void *child)
Initializes the Controller System with initial settings.
void initDigitalOutput(DigitalOutput *digitaloutput, const char *name, int hz, int port)
Initializes a digital output with the given parameters.
int updateRTD(ControllerSystem *controller)
Updates the RTD Actuator.
◆ startRTD()
int startRTD |
( |
RTD * |
rtd | ) |
|
Starts the RTD Actuator.
- Parameters
-
rtd | A pointer to the RTD structure. |
- Returns
- _SUCCESS if the actuator was started, _FAILURE otherwise.
Definition at line 23 of file RTD.c.
23 {
25 printf("Safety system not set for RTD\r\n");
27 }
29 printf("RTD Actuator is not in a safe state\r\n");
31 }
35}
int(* safety)(struct ControllerSystem *controller)
◆ updateRTD()
Updates the RTD Actuator.
- Parameters
-
- Returns
- _SUCCESS if the actuator was updated, _FAILURE otherwise.
Definition at line 37 of file RTD.c.
37 {
40 printf("RTD: Apps or Brake System Control Actuator is not validated\r\n");
42 }
43
45 printf("RTD: APPS position is too high\r\n");
47 }
48
51 printf("RTD: Brake pressure is too low\r\n");
53 }
54
57 }
58
61
63 } else {
64
66 }
67
69
70 #ifdef DEBUGn
71 printf(
"RTD updated. Ready to Drive: %d\r\n", rtd->
readyToDrive);
72 #endif
73
75}
float getAppsPosition(Apps *apps)
Averages app sensors to get pedal position.
#define MIN_BRAKE_PRESSURE
#define MAX_A_PEDAL_POSITION
int writeDigitalOutputData(DigitalOutput *output, int data)
Writes data to the buffer of the digital output.
BrakePressure * rearPressure
BrakePressure * frontPressure