-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenu.h
122 lines (105 loc) · 2.91 KB
/
menu.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#ifndef MENU_H_
#define MENU_H_
#include "ST7735.h"
#include "stdbool.h"
typedef enum{
Splash,
Menu,
Settings,
SetDate,
SetTime,
SetUnits,
//SetLights,
Testing,
Testing_1,
Warning
} menu_choice;
/* Structure for menu page items: location, font, and text*/
typedef struct{
int x, y;
int font;
char* text;
bool select;
} menu_item;
/* Structure for menu page: title, title location, header, body, footer */
typedef struct{
menu_item title;
menu_item header[3];
menu_item body [5];
menu_item footer[2];
} menu_page;
menu_page splashScreen;
menu_page menuScreen;
menu_page settingScreen;
menu_page setDateScreen;
menu_page setTimeScreen;
menu_page setUnitScreen;
menu_page testingScreen;
menu_page warningScreen;
void LCD_MenuDisplay(void);
void LCD_highlight(menu_choice screen, menu_page page, uint8_t item);
void LCD_header(menu_page page);
void LCD_body (menu_page page, uint8_t item);
void LCD_footer(menu_page page);
void decode_Date(void);
void decode_Temp(void);
void decode_Time(void);
void menu_Setup(menu_choice screen);
void splashScreen_Setup(void);
void menuScreen_Setup(void);
void settingScreen_Setup(void);
void setDateScreen_Setup(void);
void setTimeScreen_Setup(void);
void setUnitScreen_Setup(void);
void testingScreen_Setup(void);
void warningScreen_Setup(void);
// font: 15 x 20
/*
Menu Structure:
// Splashscreen:
// - Date Temp
// 1. Time
// 2. Fuel Level Indicator
// 3. Error Warning
// - Menu
// Menu:
// - Date Time Temp
// 1. Settings
// 2. Testing
// 3. Warnings
// - Exit
// Settings:
// - Date Time Temp
// 1. Set Date
// 2. Set Time
// 3. Set Units
// - Exit
Set Date:
- Date Time Temp
1. DAY
2. MM/DD/YY
- Set Exit
Set Time:
- Date Time Temp
1. HH:MM:SS AM/PM
2. Set
- Set Exit
Set Units:
- Date Time Temp
1. Temperature: C/F
2. Speed: Mph/Kph
3. FIXME: something here
- Set Exit
Testing:
- Date Time Temp
1. Test feature 1
...
n. Test feature n
- Exit
Warnings: **
- Date Time Temp
1. Temperature Warnings: n
2. Proximity Warnings: n
- Exit
*/
#endif /* MENU_H_ */