Vehicle Control Unit
0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Core
Inc
Systems
Controller
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
16
typedef
enum
{
17
APPS_OK
,
18
APPS_FAULT
,
19
}
AppsStatus
;
20
21
typedef
struct
{
22
ControllerSystem
base
;
23
AppsStatus
status
;
24
App
* app[2];
25
}
Apps
;
26
35
void
initApps
(
Apps
* apps,
int
hz,
int
channel1,
int
channel2);
36
42
void
updateApps
(
void
* apps);
43
49
float
getAppsPosition
(
Apps
* apps);
50
56
int
appsSafetyCheck
(
void
* apps);
57
58
#endif
// RENSSELAERMOTORSPORT_APPS_H
AppsStatus
AppsStatus
Definition:
Apps.h:16
APPS_OK
@ APPS_OK
Definition:
Apps.h:17
APPS_FAULT
@ APPS_FAULT
Definition:
Apps.h:18
appsSafetyCheck
int appsSafetyCheck(void *apps)
Checks the safety of Apps.
Definition:
Apps.c:74
initApps
void initApps(Apps *apps, int hz, int channel1, int channel2)
Initializes the APPs with the given frequency and channel.
Definition:
Apps.c:30
updateApps
void updateApps(void *apps)
Updates the APPS based on both sensor outputs.
Definition:
Apps.c:54
getAppsPosition
float getAppsPosition(Apps *apps)
Averages app sensors to get pedal position.
Definition:
Apps.c:66
App
Definition:
App.h:6
Apps
Definition:
Apps.h:21
Apps::status
AppsStatus status
Definition:
Apps.h:23
Apps::base
ControllerSystem base
Definition:
Apps.h:22
ControllerSystem
Definition:
ControllerSystem.h:19
Generated by
1.9.5