Repository navigation
Expand file tree
/
Copy pathMenuCodeOps.ino
More file actions
140 lines (131 loc) · 2.46 KB
/
Copy pathMenuCodeOps.ino
File metadata and controls
140 lines (131 loc) · 2.46 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
133
134
135
136
137
138
//////////////////////////////////////////////////////////////////////////////
// MenuCodeOps() - Run the IReflow Menu Functions
//////////////////////////////////////////////////////////////////////////////
void runProfileFcn(void)
{
menuCard.setLED(2, HIGH);
u8g.firstPage();
do
{
setDisplayCursor(0, 0);
u8g.print(F("Running"));
setDisplayCursor(1, 0);
u8g.print(F("Thing"));
}
while ( u8g.nextPage() );
delay(500);
menuCard.setLED(2, LOW);
}
void monTempFcn(void)
{
double myTemp;
uint8_t keyState;
menuCard.setLED(0, HIGH);
do
{
u8g.firstPage();
do
{
setDisplayCursor(0, 0);
u8g.print(F("Monitoring"));
}
while ( u8g.nextPage() );
delay(10);
keyState = menuCard.pollKeypad();
}
while (keyState != SELECT);
menuCard.setLED(0, LOW);
}
void LeadFreeFcn(void)
{
u8g.firstPage();
do
{
setDisplayCursor(1, 0);
u8g.print(F("Selected"));
setDisplayCursor(2, 0);
u8g.print(F("Option1"));
}
while ( u8g.nextPage() );
delay(2000);
}
void LeadFcn(void)
{
u8g.firstPage();
do
{
setDisplayCursor(1, 0);
u8g.print(F("Selected"));
setDisplayCursor(2, 0);
u8g.print(F("Option2"));
}
while ( u8g.nextPage() );
delay(2000);
}
void testButtons(void)
{
uint8_t keyState;
u8g.firstPage();
do
{
setDisplayCursor(0, 0);
u8g.print(F("Button tests"));
setDisplayCursor(1, 0);
u8g.print(F("Press button"));
setDisplayCursor(2, 0);
u8g.print(F("Select=exit"));
}
while ( u8g.nextPage() );
do
{
delay(100);
keyState = menuCard.pollKeypad();
switch (keyState)
{
case RIGHT:
printString("Right button");
break;
case LEFT:
printString("Left Button");
break;
case UP:
printString("Up button");
break;
case DOWN:
printString("Down button");
break;
}
}
while (keyState != SELECT);
}
void printString(char * myString)
{
u8g.firstPage();
do
{
setDisplayCursor(0, 0);
u8g.print(myString);
}
while ( u8g.nextPage() );
}
void testLEDsFcn(void)
{
u8g.firstPage();
do
{
setDisplayCursor(0, 0);
u8g.print(F("Running"));
setDisplayCursor(1, 0);
u8g.print(F("LED Tests"));
}
while ( u8g.nextPage() );
menuCard.setLED(0, HIGH);
delay(500);
menuCard.setLED(0, LOW);
menuCard.setLED(1, HIGH);
delay(500);
menuCard.setLED(1, LOW);
menuCard.setLED(2, HIGH);
delay(500);
menuCard.setLED(2, LOW);
}