-
Notifications
You must be signed in to change notification settings - Fork 0
/
RemoteTerminal.h
51 lines (38 loc) · 1.19 KB
/
RemoteTerminal.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
struct RemoteTerminalDataStruct {
bool* resetEEpromPtr;
float* maxCurrDataPtr;
float* maxVoltDataPtr;
float* minCurrDataPtr;
float* minVoltDataPtr;
};
typedef struct RemoteTerminalDataStruct RemoteTerminalData;
char input = 0;
bool print = true;
void remoteTaskFnc(void* arg)
{
RemoteTerminalData* localDataPtr = arg;
//Serial.begin(9600);
if (Serial.available() > 0 ) {
input = Serial.read();
//Serial.print(input);
if (input == '1') {
print = true;
*(localDataPtr->resetEEpromPtr) = true;
input = 0;
}else if(input == '2') {
print = true;
//Display max and min values for current(ask TA for clarification)
}else if(input == '3') {
print = true;
//Display max and min values for voltage
}
}
if(print) {
print = false;
Serial.println("[1] Reset EEPROM Values");
Serial.println("[2] Operating HV Current Range [Hi, Lo]");
Serial.println("[3] Operating HV voltage Range [Hi, Lo]");
Serial.println(" ");
Serial.println("Enter your menu choice [1-3]: ");
}
}