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 {
21
22typedef struct {
25 App* app[2];
26} Apps;
27
36void initApps(Apps* apps, int hz, int channel1, int channel2);
37
43int updateApps(ControllerSystem* controller);
44
50float getAppsPosition(Apps* apps);
51
52#endif // RENSSELAERMOTORSPORT_APPS_H
AppsStatus
Definition: Apps.h:16
@ APPS_LOW
Definition: Apps.h:19
@ APPS_OK
Definition: Apps.h:17
@ APPS_FAULT
Definition: Apps.h:18
void initApps(Apps *apps, int hz, int channel1, int channel2)
Initializes the APPs with the given frequency and channel.
Definition: Apps.c:7
int updateApps(ControllerSystem *controller)
Updates the APPS based on both sensor outputs.
Definition: Apps.c:26
float getAppsPosition(Apps *apps)
Averages app sensors to get pedal position.
Definition: Apps.c:42
Definition: App.h:6
Definition: Apps.h:22
AppsStatus status
Definition: Apps.h:24
ControllerSystem base
Definition: Apps.h:23