-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard_h.h
62 lines (42 loc) · 1.06 KB
/
dashboard_h.h
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
/*
===============================================================================
Name : dashboard_h.h
Author : Eric Tu & Terence Cho
Version : 0.1v
Copyright : Copyright (C)
Description : main definition
===============================================================================
*/
#include <LPC11xx.h>
#include <can++.h>
#include <uart++.h>
#include "util.h"
#include <mbed.h>
#include "pins.h"
#include "peripherals.h"
#include "ltc680x.h"
#include "pitches.h"
#include "bms_defs.h"
#include "can_id.h"
boolean hazard(void) {
}
boolean cruise_control(void) {
static boolean state = false;
static boolean prev_reading = HIGH;
boolean current_reading = digitalRead(IN_CRUISE_ON); //use digitalin?
if (current_reading == prev_reading) {
current_reading == HIGH ? state = false : state = true;
}
prev_reading = current_reading;
return state;
}
boolean accelerating(void) {
}
boolean braking(void) {
}
boolean reversing(void) {
}
boolean left_turn(void) {
}
boolean right_turn(void) {
}