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