-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTODO.txt
More file actions
69 lines (55 loc) · 1.79 KB
/
TODO.txt
File metadata and controls
69 lines (55 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/***
* ISR for reading Tritium speed readings off CAN
*/
void processCan(CanMessage &msg) {
boolean isCruisePressed(void) {
void resetBlinkingLightsTimer() {
char isBlinkingLightsOn() {
/***
* Increments or decrements the speed of the cruise control based on the three
* way momentary switch position. Each drive cycle will increase or decrease
* speed by a set.
*/
float adjustCruiseControl(float speed) {
/***
* Change light and horn state based on switches.
*/
// TODO: Hazard latching
void updateAuxiliaryStates() {
/***
* Turns blinkers and horn on and off based on the current state.
*/
void auxiliaryControl() {
/***
* Blinks the BRAIN debug LED to indicate any status errors.
* If okay, do not blink
* If general error, blink at 5Hz
* If CAN error, blink at 15Hz
*/
void blinkStatusLED() {
/***
* Sends a drive command packet to the Tritium motor controller. Velocity is
* in meters per second, and current is a float between 0.0 and 1.0.
*/
void sendDriveCommand(const float motor_velocity, const float motor_current) {
/***
* Sends a reset packet to the Tritium. This is called whenever there is an
* overcurrent error.
*/
void resetTritium() {
/***
* Updates whether or not the car is in cruise control.
*/
boolean getCruiseState(const states_enum old_state, const float brake) {
/***
* Updates the current state of the car (Forward, Reverse, Neutral) based on
* switches.
*/
states_enum getDrivingState(const states_enum old_state, const float brake) {
void createDriveCommands(const states_enum state, const float accel,
float getPedal(const byte port, const int lower, const int upper) {
/***
* Calls a single routine of the driver routine loop. This function reads
* pedal inputs, adjusts for thresholds, and send CAN data to the Tritium.
*/
states_enum driverControl() {