Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Apps.h
Go to the documentation of this file.
1
8#ifndef RENSSELAERMOTORSPORT_APPS_H
9#define RENSSELAERMOTORSPORT_APPS_H
10
11#include "../ControllerSystem.h"
12#include "../../Sensors/AnalogSensors/App.h"
13
14#define APPS_DIFFERENCE 0.1 // 10% as rules required
15
16typedef enum {
20
21typedef struct {
24 App* app[2];
25} Apps;
26
35void initApps(Apps* apps, int hz, int channel1, int channel2);
36
42void updateApps(void* apps);
43
49 float getAppsPosition(Apps* apps);
50
56int appsSafetyCheck(void* apps);
57
58#endif // RENSSELAERMOTORSPORT_APPS_H
AppsStatus
Definition: Apps.h:16
@ APPS_OK
Definition: Apps.h:17
@ APPS_FAULT
Definition: Apps.h:18
int appsSafetyCheck(void *apps)
Checks the safety of Apps.
Definition: Apps.c:74
void initApps(Apps *apps, int hz, int channel1, int channel2)
Initializes the APPs with the given frequency and channel.
Definition: Apps.c:30
void updateApps(void *apps)
Updates the APPS based on both sensor outputs.
Definition: Apps.c:54
float getAppsPosition(Apps *apps)
Averages app sensors to get pedal position.
Definition: Apps.c:66
Definition: App.h:6
Definition: Apps.h:21
AppsStatus status
Definition: Apps.h:23
ControllerSystem base
Definition: Apps.h:22