Vehicle Control Unit 0.01
This is the c library for controlling the car.
|
#include "../../../Inc/Systems/Controller/Apps.h"
#include "../../../Inc/Utils/Common.h"
#include <math.h>
Go to the source code of this file.
Functions | |
void | checkAppsLimit (Apps *apps) |
Checks App limits for faults. More... | |
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... | |
int appsSafetyCheck | ( | void * | apps | ) |
void checkAppsLimit | ( | Apps * | apps | ) |
Checks App limits for faults.
Checks if apps are more than 10% out of sync and if the values are reasonable. Position is in % of pedal travel.
apps | A pointer to the APPs structure. |
Definition at line 14 of file Apps.c.
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.