Vehicle Control Unit 0.01
This is the c library for controlling the car.
|
: Contains the logic for the two app sensors. More...
Go to the source code of this file.
Classes | |
struct | Apps |
Macros | |
#define | APPS_DIFFERENCE 0.1 |
Enumerations | |
enum | AppsStatus { APPS_OK , APPS_FAULT } |
Functions | |
void | initApps (Apps *apps, int hz, int channel1, int channel2) |
Initializes the APPs with the given frequency and channel. More... | |
void | updateApps (void *apps) |
Updates the APPS based on both sensor outputs. More... | |
float | getAppsPosition (Apps *apps) |
Averages app sensors to get pedal position. More... | |
int | appsSafetyCheck (void *apps) |
Checks the safety of Apps. More... | |
: Contains the logic for the two app sensors.
Definition in file Apps.h.
enum AppsStatus |
Enumerator | |
---|---|
APPS_OK | |
APPS_FAULT |
int appsSafetyCheck | ( | void * | apps | ) |
float getAppsPosition | ( | Apps * | apps | ) |
Averages app sensors to get pedal position.
apps | Pointer to the APPS controller. |
Definition at line 66 of file Apps.c.
void initApps | ( | Apps * | apps, |
int | hz, | ||
int | channel1, | ||
int | channel2 | ||
) |
Initializes the APPs with the given frequency and channel.
apps | Pointer to the Apps structure to initialize. |
hz | The frequency in Hertz at which the APP operates. |
channel1 | The analog channel the first APP is connected to. |
channel2 | The analog channel the second APP is connected to. |
Definition at line 30 of file Apps.c.
void updateApps | ( | void * | apps | ) |
Updates the APPS based on both sensor outputs.
apps | A pointer to the APPs structure. |
Definition at line 54 of file Apps.c.