SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
Front.h
1#ifndef __FRONT_H__
2#define __FRONT_H__
3
4#include "ECU.h"
5#include "ECUGlobalConfig.h"
6#include "Faults.h"
7#include "Log.h"
8
9#define INTERVAL_HIGH_PRIORITY 20
10#define INTERVAL_MED_HIGH_PRIORITY 400
11#define INTERVAL_MED_LOW_PRIORITY 800
12#define INTERVAL_LOW_PRIORITY 1200
13
17namespace Front {
18
19extern LOG_TAG ID;
20extern struct State::State_t *currentState;
21
25void run();
26
27
28
32void loadStateMap();
33
38
44void updateStartLight(bool hasBeat);
45
49void setChargeSignal();
50
55
60}
61#endif // __FRONT_H__
Configure global build properties.
Checks for defined faults from canbus addresses or pins.
Special logging functionality.
const char * LOG_TAG
Type definition of logging tags This typedef is necessary to allow for easier manipulation of code by...
Definition Log.h:48
Name space used solely for front ECU logic.
Definition src/front.cpp:13
void setChargeSignal()
Enables the charging signal dependent on the current state.
void run()
Runs front ECU code.
Definition src/front.cpp:72
void lowPriorityValues()
Outputs values that are of lower priority.
void highPriorityValues()
Outputs values that are of higher priority.
void updateStartLight(bool hasBeat)
Update the startlight.
void loadStateMap()
Load values that ID each unique state.
void updateCurrentState()
Update and outputs the current state.
The parent state structure to extend from to create more states.
Definition State.h:70