Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
RTD.h
Go to the documentation of this file.
1#ifndef __RENNSSELAERMOTORSPORT_RTD_H
2#define __RENNSSELAERMOTORSPORT_RTD_H
3
4#include "Apps.h"
6#include "../ControllerSystem.h"
7#include "../../Outputs/DigitalOutput.h"
8#include "../../Sensors/DigitalSensors/Button.h"
9#include "../../Utils/Common.h"
10
11typedef struct {
13 uint8_t readyToDrive;
14 uint8_t precharged;
15 uint8_t counter;
20} RTD;
21
28void initRTD(RTD* rtd, Apps* apps, BrakeSystemControl* bsc, int hz, int buttonPort, int piezoPort);
29
36int startRTD(RTD* rtd);
37
44int updateRTD(ControllerSystem* controller);
45
52int checkRTD(void* rtd);
53#endif // __RENNSSELAERMOTORSPORT_RTD_H
: Contains the logic for the two app sensors.
int checkRTD(void *rtd)
Checks if RTD is in ready to drive state.
Definition: RTD.c:77
int startRTD(RTD *rtd)
Starts the RTD Actuator.
Definition: RTD.c:23
int updateRTD(ControllerSystem *controller)
Updates the RTD Actuator.
Definition: RTD.c:37
void initRTD(RTD *rtd, Apps *apps, BrakeSystemControl *bsc, int hz, int buttonPort, int piezoPort)
Initializes the RTD Actuator with initial settings.
Definition: RTD.c:6
Definition: Apps.h:22
Definition: Button.h:6
Definition: RTD.h:11
BrakeSystemControl * bsc
Definition: RTD.h:19
Apps * apps
Definition: RTD.h:18
ControllerSystem base
Definition: RTD.h:12
uint8_t precharged
Definition: RTD.h:14
uint8_t readyToDrive
Definition: RTD.h:13
DigitalOutput * piezo
Definition: RTD.h:17
Button * button
Definition: RTD.h:16
uint8_t counter
Definition: RTD.h:15