keyboard update

This commit is contained in:
richonguzman 2023-10-22 23:33:39 -03:00
parent 4f8b288148
commit 9d12805928
3 changed files with 118 additions and 389 deletions

View File

@ -9,21 +9,22 @@ extern uint32_t menuTime;
namespace BUTTON_Utils {
void singlePress() {
menuTime = millis();
KEYBOARD_Utils::downArrow();
}
void longPress() {
menuTime = millis();
KEYBOARD_Utils::rightArrow();
}
void doublePress() {
display_toggle(true);
menuTime = millis();
if (menuDisplay == 0) {
menuDisplay = 1;
menuTime = millis();
} else if (menuDisplay > 0) {
menuDisplay = 0;
menuTime = millis();
displayTime = millis();
}
}

View File

@ -34,29 +34,36 @@ extern String messageText;
namespace KEYBOARD_Utils {
void upArrow() {
if (menuDisplay >= 1 && menuDisplay <= 7) {
if (menuDisplay >= 1 && menuDisplay <= 6) {
menuDisplay--;
if (menuDisplay == 0) {
menuDisplay = 7;
if (menuDisplay < 1) {
menuDisplay = 6;
}
} else if (menuDisplay >= 10 && menuDisplay <= 12) {
menuDisplay--;
menuTime = millis();
if (menuDisplay == 9) {
if (menuDisplay < 10) {
menuDisplay = 12;
}
} else if (menuDisplay >= 20 && menuDisplay <= 24) {
} else if (menuDisplay >= 20 && menuDisplay <= 25) {
menuDisplay--;
menuTime = millis();
if (menuDisplay == 19) {
menuDisplay = 24;
if (menuDisplay < 20) {
menuDisplay = 25;
}
} else if (menuDisplay >= 210 && menuDisplay <= 211) {
menuDisplay--;
menuTime = millis();
if (menuDisplay == 209) {
if (menuDisplay < 210) {
menuDisplay = 211;
}
} else if (menuDisplay >= 220 && menuDisplay <= 221) {
menuDisplay--;
if (menuDisplay < 220) {
menuDisplay = 221;
}
} else if (menuDisplay >= 60 && menuDisplay <= 61) {
menuDisplay--;
if (menuDisplay < 60) {
menuDisplay = 61;
}
}
}
@ -70,66 +77,69 @@ namespace KEYBOARD_Utils {
displayState = true;
}
}
if (menuDisplay >= 1 && menuDisplay <= 7) {
if (menuDisplay >= 1 && menuDisplay <= 6) {
menuDisplay++;
menuTime = millis();
if (menuDisplay == 8) {
if (menuDisplay > 6) {
menuDisplay = 1;
}
}
else if (menuDisplay >= 10 && menuDisplay <= 12) {
menuDisplay++;
menuTime = millis();
if (menuDisplay == 13) {
if (menuDisplay > 12) {
menuDisplay = 10;
}
} else if (menuDisplay == 100) {
messagesIterator++;
if (messagesIterator == MSG_Utils::getNumAPRSMessages()) {
menuDisplay = 10;
menuTime = millis();
messagesIterator = 0;
if (Config.notification.ledMessage){
messageLed = false;
}
} else {
menuDisplay = 100;
menuTime = millis();
}
} else if (menuDisplay == 110) { //////
} else if (menuDisplay == 110) {
menuDisplay = 11;
menuTime = millis();
}
else if (menuDisplay >= 20 && menuDisplay <= 24) {
else if (menuDisplay >= 20 && menuDisplay <= 25) {
menuDisplay++;
menuTime = millis();
if (menuDisplay == 25) {
if (menuDisplay > 25) {
menuDisplay = 20;
}
} else if (menuDisplay >= 210 && menuDisplay <= 211) {
menuDisplay++;
menuTime = millis();
if (menuDisplay == 212) {
if (menuDisplay > 211) {
menuDisplay = 210;
}
} else if (menuDisplay >= 220 && menuDisplay <= 221) {
menuDisplay++;
if (menuDisplay > 221) {
menuDisplay = 220;
}
}
else if (menuDisplay == 30) {
menuDisplay = 3;
menuTime = millis();
}
else if (menuDisplay == 40) {
menuDisplay = 4;
menuTime = millis();
}
else if (menuDisplay >= 60 && menuDisplay <= 61) {
menuDisplay++;
if (menuDisplay > 61) {
menuDisplay = 60;
}
}
}
void leftArrow() {
if (menuDisplay >= 1 && menuDisplay <= 7) { // Return to Main Menu
if (menuDisplay >= 1 && menuDisplay <= 6) {
menuDisplay = 0;
} else if (menuDisplay >= 10 && menuDisplay <= 12) { // Return to Menu : Messages
} else if (menuDisplay >= 10 && menuDisplay <= 12) {
menuDisplay = 1;
} else if (menuDisplay==110) {
messageCallsign = "";
@ -137,19 +147,9 @@ namespace KEYBOARD_Utils {
} else if (menuDisplay==111) {
messageText = "";
menuDisplay = 110;
}
else if ((menuDisplay >= 20 && menuDisplay <= 29) || (menuDisplay >= 200 && menuDisplay <= 290)) {
} else if ((menuDisplay>=20 && menuDisplay<=29) || (menuDisplay==120) || (menuDisplay>=200 && menuDisplay<=290) || (menuDisplay>=60 && menuDisplay<=61) || (menuDisplay==30) || (menuDisplay==40)) {
menuDisplay = int(menuDisplay/10);
}
else if (menuDisplay == 30) { // Return to Menu : Stations
menuDisplay = 3;
}
else if (menuDisplay == 40) { // Return to Menu : Weather
menuDisplay = 4;
}
/* winlinkMailNumber = "";*/
}
@ -168,15 +168,12 @@ namespace KEYBOARD_Utils {
STATION_Utils::saveCallsingIndex(myBeaconsIndex);
} else if ((menuDisplay>=1 && menuDisplay<=3) || (menuDisplay>=11 &&menuDisplay<=12) || (menuDisplay>=20 && menuDisplay<=29)) {
menuDisplay = menuDisplay*10;
menuTime = millis();
} else if (menuDisplay == 10) {
MSG_Utils::loadMessagesFromMemory();
if (MSG_Utils::warnNoMessages()) {
menuDisplay = 10;
menuTime = millis();
} else {
menuDisplay = 100;
menuTime = millis();
}
} else if (menuDisplay == 120) {
MSG_Utils::deleteFile();
@ -194,7 +191,7 @@ namespace KEYBOARD_Utils {
show_display("_DISPLAY__", "", " ECO MODE -> OFF", 1000);
}
} else if (menuDisplay == 211) {
if (screenBrightness <=1) {
if (screenBrightness ==1) {
show_display("_SCREEN___", "", "SCREEN BRIGHTNESS MAX", 1000);
screenBrightness = 255;
} else {
@ -202,23 +199,30 @@ namespace KEYBOARD_Utils {
screenBrightness = 1;
}
} else if (menuDisplay == 220) {
show_display("_NOTIFIC_", "", "ALL NOTIFICATIONS OFF","STILL IN DEVELOPMENT!", 2000); /////////////////////////
show_display("_STATUS___", "", "WRITE STATUS","STILL IN DEVELOPMENT!", 2000); /////////////////////////
} else if (menuDisplay == 221) {
show_display("_STATUS___", "", "SELECT STATUS","STILL IN DEVELOPMENT!", 2000); /////////////////////////
} else if (menuDisplay == 230) {
show_display("_NOTIFIC__", "", "NOTIFICATIONS","STILL IN DEVELOPMENT!", 2000); /////////////////////////
}
else if (menuDisplay == 4) {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "Loop", "%s", "wrl");
MSG_Utils::sendMessage("CD2RXU-15","wrl");
menuTime = millis();
}
else if (menuDisplay == 5) {
show_display("__STATUS__", "still on", "development..", 1500);
show_display("_WINLINK_", "still on", "development..", 2000); /////////////////////////
}
else if (menuDisplay == 6) {
show_display("_WINLINK_", "still on", "development..", 1500);
}
else if (menuDisplay == 7) {
show_display("EMERGENCY", "still on", "development..", 1500);
menuDisplay = 60;
} else if (menuDisplay == 60) {
show_display("EMERGENCY_", "Digirepeater still", "on development..", 2000); /////////////////////////
} else if (menuDisplay == 61) {
show_display("EMERGENCY_", "S.O.S. still", "on development..", 2000); /////////////////////////
}
}
void processPressedKey(char key) {
@ -237,7 +241,7 @@ namespace KEYBOARD_Utils {
messagesIterator = 0;
messageCallsign = "";
messageText = "";
} else if (menuDisplay >= 1 && menuDisplay <= 7 && key >=49 && key <= 55) { // Menu number select
} else if (menuDisplay >= 1 && menuDisplay <= 6 && key >=49 && key <= 55) { // Menu number select
menuDisplay = key - 48;
} else if (menuDisplay == 110 && key != 180) { // Writing Callsign of Message
if (messageCallsign.length() == 1) {
@ -286,10 +290,10 @@ namespace KEYBOARD_Utils {
show_display("__ INFO __", "", " CHANGING CALLSIGN!", 1000);
STATION_Utils::saveCallsingIndex(myBeaconsIndex);
menuDisplay = 0;
} else if (menuDisplay==230) {
} else if (menuDisplay==240) {
show_display("", "", " REBOOTING ...", 2000);
ESP.restart();
} else if (menuDisplay==240) {
} else if (menuDisplay==250) {
show_display("", "", " POWER OFF ...", 2000);
powerManagement.shutdown();
}
@ -306,295 +310,7 @@ namespace KEYBOARD_Utils {
else if (key == 183) { // Arrow Right
rightArrow();
}
/*else if (menuDisplay == 0 && key == 37) {
handleNextGpsLocation(myGpsLocationsSize);
} else if (menuDisplay == 0 && key == 41) {
if (showCompass == false) {
showCompass = true;
} else {
showCompass = false;
}
}
else if (key == 8) { // Delete Last Key
messageText = messageText.substring(0, messageText.length()-1);
}
Serial.println(messageText);
} else if (menuDisplay == 1200 && key == 13) {
deleteFile(aprsMsgFilePath);
deleteFile(loraMsgFilePath);
show_display("_DELETING_", "", "ALL MESSAGES DELETED", 1500);
loadNumMessages();
menuDisplay = 1;
} else if (menuDisplay == 1210 && key == 13) {
deleteFile(aprsMsgFilePath);
show_display("_DELETING_", "", "ALL APRS MESSAGES", "DELETED!", 1500);
loadNumMessages();
menuDisplay = 1;
} else if (menuDisplay == 1220 && key == 13) {
deleteFile(loraMsgFilePath);
show_display("_DELETING_", "", "ALL LoRa DM DELETED", 1500);
loadNumMessages();
menuDisplay = 1;
} else if (menuDisplay == 700 && key != 180) {
if (messageText.length() == 1) {
messageText.trim();
}
if (key >= 32 && key <= 126) {
messageText += key;
} else if (key == 13) { // Return Pressed: SENDING MESSAGE
messageText.trim();
Serial.println(messageText.length());
if (messageText.length() > 58){
Serial.println(messageText.length());
messageText = messageText.substring(0,58);
}
sendMessage("APRS", "ANSRVR", "CQ HOTG " + messageText);
menuDisplay = 70;
messageText = "";
} else if (key == 8) { // Delete Last Key
messageText = messageText.substring(0, messageText.length()-1);
}
} else if (menuDisplay >= 8020 && menuDisplay <= 8050 && key >= 48 && key <= 57) {
winlinkMailNumber = key;
} else if (menuDisplay >= 8020 && menuDisplay <= 8050 && key == 8) {
winlinkMailNumber = "";
} else if (menuDisplay == 8020 && key == 13) {
show_display("__WNLK_Tx>", "", " READ MAIL N." + winlinkMailNumber, 1500);
sendMessage("WLNK", "WLNK-1", "R" + winlinkMailNumber);
winlinkMailNumber = "";
menuDisplay = int(menuDisplay/10);
} else if (menuDisplay == 8030 && key == 13) {
show_display("__WNLK_Tx>", "", " REPLY MAIL N." + winlinkMailNumber, 1500);
sendMessage("WLNK", "WLNK-1", "Y" + winlinkMailNumber);
winlinkMailNumber = "";
menuDisplay = 8082;
} else if (menuDisplay == 8040 && key == 13) {
menuDisplay = 80400;
} else if (menuDisplay == 80400) {
if (winlinkAddressee.length() == 1) {
winlinkAddressee.trim();
}
if ((key >= 65 && key <=90) || (key >= 97 && key <= 122) || (key >= 48 && key <= 57) || (key == 45) || (key == 46) || (key == 64) || (key == 95)) {
winlinkAddressee += key;
} else if (key == 13 && winlinkAddressee.length() > 0) {
winlinkAddressee.trim();
show_display("__WNLK_Tx>", "", "FORWARD MAIL N." + winlinkMailNumber, "TO = " + winlinkAddressee, 1500);
sendMessage("WLNK", "WLNK-1", "F" + winlinkMailNumber + " " + winlinkAddressee);
winlinkMailNumber = "";
winlinkAddressee = "";
menuDisplay = 804;
} else if (key == 8) {
winlinkAddressee = winlinkAddressee.substring(0, winlinkAddressee.length()-1);
} else if (key == 180) {
menuDisplay = 8040;
winlinkAddressee = "";
}
} else if (menuDisplay == 8050 && key == 13) {
show_display("__WNLK_Tx>", "", " DELETE MAIL N." + winlinkMailNumber, 1500);
sendMessage("WLNK", "WLNK-1", "K" + winlinkMailNumber);
winlinkMailNumber = "";
menuDisplay = 805;
} else if (menuDisplay == 80600) {
if (winlinkAlias.length() == 1) {
winlinkAlias.trim();
}
if ((key >= 65 && key <=90) || (key >= 97 && key <= 122) || (key >= 48 && key <= 57)) {
winlinkAlias += key;
} else if (key == 13) {
winlinkAlias.trim();
menuDisplay = 80601;
} else if (key == 8) {
winlinkAlias = winlinkAlias.substring(0, winlinkAlias.length()-1);
} else if (key == 180) {
menuDisplay = 8060;
winlinkAlias = "";
}
} else if (menuDisplay == 80601) {
if (winlinkAliasComplete.length() == 1) {
winlinkAliasComplete.trim();
}
if ((key >= 65 && key <=90) || (key >= 97 && key <= 122) || (key >= 48 && key <= 57) || (key == 45) || (key == 46) || (key == 64) || (key == 95)) {
winlinkAliasComplete += key;
} else if (key == 13) {
winlinkAliasComplete.trim();
show_display("__WNLK_Tx>", "", "CREATE ALIAS -> ", winlinkAlias + " = " + winlinkAliasComplete, 3000);
sendMessage("WLNK", "WLNK-1", "A " + winlinkAlias + "=" + winlinkAliasComplete);
winlinkAlias = "";
winlinkAliasComplete = "";
menuDisplay = 8060;
} else if (key == 8) {
winlinkAliasComplete = winlinkAliasComplete.substring(0, winlinkAliasComplete.length()-1);
} else if (key == 180) {
menuDisplay = 80600;
winlinkAliasComplete = "";
}
} else if (menuDisplay == 80610) {
if (winlinkAlias.length() == 1) {
winlinkAlias.trim();
}
if ((key >= 65 && key <=90) || (key >= 97 && key <= 122) || (key >= 48 && key <= 57)) {
winlinkAlias += key;
} else if (key == 13) {
winlinkAlias.trim();
show_display("__WNLK_Tx>", "", "DELETE ALIAS-> " + winlinkAlias, 2000);
sendMessage("WLNK", "WLNK-1", "A " + winlinkAlias + "=");
winlinkAlias = "";
menuDisplay = 8061;
} else if (key == 8) {
winlinkAlias = winlinkAlias.substring(0, winlinkAlias.length()-1);
} else if (key == 180) {
menuDisplay = 8061;
winlinkAlias = "";
}
} else if (menuDisplay == 8080) {
if (winlinkAddressee.length() == 1) {
winlinkAddressee.trim();
}
if ((key >= 65 && key <=90) || (key >= 97 && key <= 122) || (key >= 48 && key <= 57) || (key == 45) || (key == 46) || (key == 64) || (key == 95)) {
winlinkAddressee += key;
} else if (key == 13 && winlinkAddressee.length() > 0) {
winlinkAddressee.trim();
menuDisplay = 8081;
} else if (key == 8) {
winlinkAddressee = winlinkAddressee.substring(0, winlinkAddressee.length()-1);
} else if (key == 180) {
menuDisplay = 808;
winlinkAddressee = "";
}
} else if (menuDisplay == 8081) {
if (winlinkSubject.length() == 1) {
winlinkSubject.trim();
}
if ((key >= 65 && key <=90) || (key >= 97 && key <= 122) || (key == 32) || (key >= 48 && key <= 57)) {
winlinkSubject += key;
} else if (key == 13 && winlinkSubject.length() > 0) {
winlinkSubject.trim();
show_display("__WNLK_Tx>", "", "Mail -> " + winlinkAddressee, "Subj -> " + winlinkSubject, 2000);
sendMessage("WLNK", "WLNK-1", "SP " + winlinkAddressee + " " + winlinkSubject);
menuDisplay = 8082;
} else if (key == 8) {
winlinkSubject = winlinkSubject.substring(0, winlinkSubject.length()-1);
} else if (key == 180) {
menuDisplay = 8080;
winlinkSubject = "";
}
} else if (menuDisplay == 8082) {
if (winlinkBody.length() == 1) {
winlinkBody.trim();
}
if ((key >= 32 && key <=122)) {
winlinkBody += key;
} else if (key == 13 && winlinkBody.length() <= 67) {
winlinkBody.trim();
show_display("__WNLK_Tx>", "", "Body -> " + winlinkBody, 2000);
sendMessage("WLNK", "WLNK-1", winlinkBody);
menuDisplay = 8083;
} else if (key == 8) {
winlinkBody = winlinkBody.substring(0, winlinkBody.length()-1);
} else if (key == 180) {
winlinkBody = "";
}
}*/
}
/*
else if (menuDisplay == 2) { // Status Menu
menuDisplay = 20;
} else if (menuDisplay == 20) {
Serial.println("--> Status Write");
} else if (menuDisplay == 21) { //Status Select from Favourites
menuDisplay = 210;
} else if (menuDisplay == 210) {
sendStatus(StatusAvailable[0]);
menuDisplay = 21;
} else if (menuDisplay == 211) {
sendStatus(StatusAvailable[1]);
menuDisplay = 21;
} else if (menuDisplay == 212) {
sendStatus(StatusAvailable[2]);
menuDisplay = 21;
} else if (menuDisplay == 213) {
sendStatus(StatusAvailable[3]);
menuDisplay = 21;
} else if (menuDisplay == 214) {
sendStatus(StatusAvailable[4]);
menuDisplay = 21;
}
else if (menuDisplay == 8) { // Winlink/Mail Menu Login
if (winlinkStatus == 5) {
menuDisplay = 800;
} else {
winlinkStatus = 1;
sendMessage("WLNK", "WLNK-1", "L");
menuDisplay = 80;
}
}
else if (menuDisplay == 800) { // List Pending Mails
show_display("__WLNK_Tx>", "", " LIST MAILS",1000);
sendMessage("WLNK", "WLNK-1", "L");
menuDisplay = 800;
Serial.println(menuDisplay);
} else if (menuDisplay == 801) { // Downloaded Mails
loadMessagesFromMemory("WLNK");
if (noMessageWarning) {
menuDisplay = 801;
} else {
menuDisplay = 8010;
}
} else if (menuDisplay == 802) { // Read Mail n° #
menuDisplay = 8020;
} else if (menuDisplay == 803) { // Reply Mail n° #
menuDisplay = 8030;
} else if (menuDisplay == 804) { // Forward Mail n° #
menuDisplay = 8040;
} else if (menuDisplay == 805) { // Delete Mail n° #
menuDisplay = 8050;
} else if (menuDisplay == 806) { // Alias Menu
menuDisplay = 8060;
} else if (menuDisplay == 807) { // Log Out
sendMessage("WLNK", "WLNK-1", "B");
show_display("__WLNK_Tx>", "", " LOG OUT !!!",2000);
menuDisplay = 8;
winlinkStatus = 0;
} else if (menuDisplay == 808) { // Write Mail
menuDisplay = 8080;
} else if (menuDisplay == 8010) { // Read Saved Mails
menuDisplay = 80100;
} else if (menuDisplay == 8011) { // Delete Saved Mails
deleteFile(winlinkMsgFilePath);
show_display("_DELETING_", "", " ALL MAILS DELETED", 1500);
loadNumMessages();
menuDisplay = 801;
} else if (menuDisplay == 80100) {
messagesIterator++;
if (messagesIterator == numWNLKMessages) {
menuDisplay = 8010;
messagesIterator = 0;
} else {
menuDisplay = 80100;
}
} else if (menuDisplay == 8060) { // Create Alias
menuDisplay = 80600;
} else if (menuDisplay == 8061) { // Delete Alias
menuDisplay = 80610;
} else if (menuDisplay == 8062) { // List all Alias
show_display("__WLNK_Tx>", "", " LIST ALL ALIAS",1500);
sendMessage("WLNK", "WLNK-1", "AL");
menuDisplay = 8062;
} else if (menuDisplay == 8083) {
show_display("__WLNK_Tx>", "", "Ending Mail", 2000);
sendMessage("WLNK", "WLNK-1", "/EX");
winlinkAddressee = "";
winlinkSubject = "";
winlinkBody = "";
menuDisplay = 808;
} else if (menuDisplay == 8084) {
winlinkBody = "";
menuDisplay = 8082;
}
*/
void read() {
uint32_t lastKey = millis() - keyboardTime;
@ -607,8 +323,7 @@ namespace KEYBOARD_Utils {
if (c != 0) {
// just for debugging
Serial.print(c, DEC); Serial.print(" "); Serial.print(c, HEX); Serial.print(" "); Serial.println(char(c));
//
//Serial.print(c, DEC); Serial.print(" "); Serial.print(c, HEX); Serial.print(" "); Serial.println(char(c));
keyboardTime = millis();
processPressedKey(c);

View File

@ -43,8 +43,25 @@ namespace MENU_Utils {
}
switch (menuDisplay) { // Graphic Menu is in here!!!!
case 1: // 1. Messages
show_display("__MENU____"," 7.Emergency", "> 1.Messages", " 2.Configuration", " 3.Stations", lastLine);
show_display("__MENU____"," 6.Emergency", "> 1.Messages", " 2.Configuration", " 3.Stations", lastLine);
break;
case 2: // 2. Configuration
show_display("__MENU____", " 1.Messages", "> 2.Configuration", " 3.Stations", " 4.Weather Report", lastLine);
break;
case 3: //3. Stations
show_display("__MENU____", " 2.Configuration", "> 3.Stations", " 4.Weather Report", " 5.Winlink/Mail", lastLine);
break;
case 4: //4. Weather
show_display("__MENU____", " 3.Stations", "> 4.Weather Report", " 5.Winlink/Mail", " 6.Emergency", lastLine);
break;
case 5: //5. Winlink
show_display("__MENU____", " 4.Weather Report", "> 5.Winlink/Mail", " 6.Emergency", " 1.Messages", lastLine);
break;
case 6: //6. Emergency
show_display("__MENU____", " 5.Winlink/Mail", "> 6.Emergency", " 1.Messages", " 2.Configuration", lastLine);
break;
case 10: // 1.Messages ---> Messages Read
show_display("_MESSAGES_", "> Read (" + String(MSG_Utils::getNumAPRSMessages()) + ")", " Write", " Delete", "", lastLine);
break;
@ -86,23 +103,24 @@ namespace MENU_Utils {
break;
case 2: // 2.Configuration
show_display("__MENU____", " 1.Messages", "> 2.Configuration", " 3.Stations", " 4.Weather Report", lastLine);
break;
case 20: // 2.Configuration ---> Callsign
show_display("_CONFIG___", " Power Off", "> Callsign"," Display", " Notifications",lastLine);
show_display("_CONFIG___", " Power Off", "> Callsign Change"," Display", " Status",lastLine);
break;
case 21: // 2.Configuration ---> Display
show_display("_CONFIG___", " Callsign", "> Display", " Notifications", " Reboot",lastLine);
show_display("_CONFIG___", " Callsign Change", "> Display", " Status", " Notifications",lastLine);
break;
case 22: // 2.Configuration ---> Notifications
show_display("_CONFIG___", " Display", "> Notifications", " Reboot", " Power Off", lastLine);
case 22: // 2.Configuration ---> Status
show_display("_CONFIG___", " Display", "> Status", " Notifications", " Reboot", lastLine);
break;
case 23: // 2.Configuration ---> Reboot
show_display("_CONFIG___", " Notifications","> Reboot", " Power Off", " Callsign",lastLine);
case 23: // 2.Configuration ---> Notifications
show_display("_CONFIG___", " Status","> Notifications", " Reboot", " Power Off",lastLine);
break;
case 24: // 2.Configuration ---> Power Off
show_display("_CONFIG___", " Reboot", "> Power Off", " Callsign", " Display",lastLine);
case 24: // 2.Configuration ---> Reboot
show_display("_CONFIG___", " Notifications", "> Reboot", " Power Off", " Callsign Change",lastLine);
break;
case 25: // 2.Configuration ---> Power Off
show_display("_CONFIG___", " Reboot", "> Power Off", " Callsign Change", " Display",lastLine);
break;
case 200: // 2.Configuration ---> Callsign
@ -110,60 +128,55 @@ namespace MENU_Utils {
break;
case 210: // 2.Configuration ---> Display ---> ECO Mode
show_display("_DISPLAY__", "> ECO Mode"," Brightness","","",lastLine);
show_display("_DISPLAY__", "", "> ECO Mode"," Brightness","",lastLine);
break;
case 211: // 2.Configuration ---> Display ---> Brightness
show_display("_DISPLAY__", " ECO Mode","> Brightness","","",lastLine);
show_display("_DISPLAY__", "", " ECO Mode","> Brightness","",lastLine);
break;
case 220: // 2.Configuration ---> Notifications
show_display("_NOTIFIC__", " blabla"," blabla2","","",lastLine);
case 220: // 2.Configuration ---> Status
show_display("_STATUS___", "", "> Write"," Select","",lastLine);
break;
case 221: // 2.Configuration ---> Status
show_display("_STATUS___", "", " Write","> Select","",lastLine);
break;
case 230: // 2.Configuration ---> Reboot
case 230: // 2.Configuration ---> Notifications
show_display("_NOTIFIC__", "> Turn Off Sound/Led","","","",lastLine);
break;
case 240: // 2.Configuration ---> Reboot
if (keyboardDetected) {
show_display("_REBOOT___", ""," Confirm Reboot?","","","<Back Enter=Confirm");
show_display("_REBOOT?__", ""," Confirm Reboot...","","","<Back Enter=Confirm");
} else {
show_display("_REBOOT___", "no Keyboard Detected"," Use RST Button to","Reboot Tracker","",lastLine);
show_display("_REBOOT?__", "no Keyboard Detected"," Use RST Button to","Reboot Tracker","",lastLine);
}
break;
case 240: // 2.Configuration ---> Power Off
case 250: // 2.Configuration ---> Power Off
if (keyboardDetected) {
show_display("POWER OFF?", ""," Confirm Power Off?","","","<Back Enter=Confirm");
show_display("POWER_OFF?", ""," Confirm Power Off...","","","<Back Enter=Confirm");
} else {
show_display("POWER OFF?", "no Keyboard Detected"," Use PWR Button to","Power Off Tracker","",lastLine);
show_display("POWER_OFF?", "no Keyboard Detected"," Use PWR Button to","Power Off Tracker","",lastLine);
}
break;
case 3: //3.Stations
show_display("__MENU____", " 2.Configuration", "> 3.Stations", " 4.Weather Report", " 5.Status", lastLine);
break;
case 30: //3.Stations ---> Display Heared Tracker/Stations
show_display("LISTENING>", STATION_Utils::getFirstNearTracker(), STATION_Utils::getSecondNearTracker(), STATION_Utils::getThirdNearTracker(), STATION_Utils::getFourthNearTracker(), "<Back");
break;
case 4: //4.Weather
show_display("__MENU____", " 3.Stations", "> 4.Weather Report", " 5.Status", " 6.Winlink/Mail", lastLine);
break;
case 40:
// waiting for Weather Report
break;
case 5: //5.Status
show_display("__MENU____", " 4.Weather Report", "> 5.Status", " 6.Winlink/Mail", " 7.Emergency", lastLine);
case 60: // 6. Emergency ---> Digirepeater
show_display("EMERGENCY_", "", "> Digirepeater", " S.O.S.","",lastLine);
break;
case 6: //6.Winlink
show_display("__MENU____", " 5.Status", "> 6.Winlink/Mail", " 7.Emergency", " 1.Messages", lastLine);
case 61: // 6. Emergency ---> S.O.S.
show_display("EMERGENCY_", "", " Digirepeater", "> S.O.S.","",lastLine);
break;
case 7: //7.Emergency
show_display("__MENU____", " 6.Winlink/Mail", "> 7.Emergency", " 1.Messages", " 2.Configuration", lastLine);
break;
case 0: ///////////// MAIN MENU //////////////
String hdopState, firstRowMainMenu, secondRowMainMenu, thirdRowMainMenu, fourthRowMainMenu, fifthRowMainMenu, sixthRowMainMenu;