-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.h
More file actions
132 lines (116 loc) · 2.17 KB
/
menu.h
File metadata and controls
132 lines (116 loc) · 2.17 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
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
123
124
125
126
127
128
129
130
131
132
const char s_motorType[] PROGMEM = "MOTOR TYPE";
const char s_motor14p[] PROGMEM = "12S14P";
const char s_motor12p[] PROGMEM = "9S12P";
const char s_bladesCount[] PROGMEM = "BLADES COUNT";
const char s_edit[] PROGMEM = " < > ";
const char s_enableScale[] PROGMEM = "THRUST SENSOR";
const char s_enableScale_true[] PROGMEM = "ENABLED";
const char s_enableScale_false[] PROGMEM = "DISABLED";
const char s_rpm[] PROGMEM = "RPM:";
const char s_mode[] PROGMEM = "SELECT MODE";
const char s_mode_stand[] PROGMEM = "CONNECTED";
const char s_mode_hh[] PROGMEM = "HANDHELD";
const char *const l_settings_stand[] PROGMEM = {s_mode, s_motorType, s_enableScale};
const char *const l_settings_hh[] PROGMEM = {s_mode, s_bladesCount, s_enableScale};
const char *const l_motorTypes[] PROGMEM = {s_motor14p, s_motor12p};
const char *const l_modes[] PROGMEM = {s_mode_hh, s_mode_stand};
const char *const l_enableScale_options[] PROGMEM = {s_enableScale_false, s_enableScale_true};
// 3blades top right
byte customChar0[] = {
B10000,
B10000,
B10000,
B10000,
B10000,
B10000,
B00000,
B10000
};
// 3blades top left
byte customChar1[] = {
B00001,
B00001,
B00001,
B00001,
B00001,
B00001,
B00000,
B00001
};
// 3blades bottom left
byte customChar2[] = {
B00001,
B00000,
B00110,
B00100,
B01100,
B01000,
B11000,
B10000
};
// 3blades bottom right
byte customChar3[] = {
B10000,
B00000,
B01100,
B00100,
B00110,
B00010,
B00011,
B00001
};
// 4blades top right
byte customChar4[] = {
B00001,
B00011,
B00010,
B00110,
B00100,
B01100,
B00000,
B10000
};
// 4blades top left
byte customChar5[] = {
B10000,
B11000,
B01000,
B01100,
B00100,
B00110,
B00000,
B00001
};
// 2blades left top
byte customChar6[] = {
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
B00001
};
// 2blades right bottom
byte customChar7[] = {
B10000,
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
B00000
};
char pgm_string_buff[17];
char* readPgmString(uint16_t ptr)
{
uint8_t i = 0;
do
{
pgm_string_buff[i] = (char)pgm_read_byte(ptr++);
}
while(pgm_string_buff[i++] != NULL);
return pgm_string_buff;
}