display code update

This commit is contained in:
richonguzman 2024-08-14 13:48:20 -04:00
parent cfb39742e1
commit 05ccfe8ddd
17 changed files with 166 additions and 166 deletions

View File

@ -46,7 +46,7 @@ TinyGPSPlus gps;
OneButton userButton = OneButton(BUTTON_PIN, true, true);
#endif
String versionDate = "2024.08.12";
String versionDate = "2024.08.14";
uint8_t myBeaconsIndex = 0;
int myBeaconsSize = Config.beacons.size();
@ -105,7 +105,7 @@ void setup() {
#endif
POWER_Utils::setup();
setup_display();
displaySetup();
POWER_Utils::externalPinSetup();
STATION_Utils::loadIndex(0);

View File

@ -99,7 +99,7 @@ namespace BLE_Utils {
return;
}
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "BLE Tx", "%s", BLEToLoRaPacket.c_str());
show_display("BLE Tx >>", "", BLEToLoRaPacket, 1000);
displayShow("BLE Tx >>", "", BLEToLoRaPacket, 1000);
LoRa_Utils::sendNewPacket(BLEToLoRaPacket);
BLEToLoRaPacket = "";
sendBleToLoRa = false;

View File

@ -42,7 +42,7 @@ namespace BLUETOOTH_Utils {
if (!SerialBT.begin(String("LoRa Tracker " + String(ourId)))) {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "Bluetooth", "Starting Bluetooth failed!");
show_display("ERROR", "Starting Bluetooth failed!", "");
displayShow("ERROR", "Starting Bluetooth failed!", "");
while(true) {
delay(1000);
}
@ -109,7 +109,7 @@ namespace BLUETOOTH_Utils {
}
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "BT TX", "%s", serialReceived.c_str());
show_display("BT Tx >>", "", serialReceived, 1000);
displayShow("BT Tx >>", "", serialReceived, 1000);
LoRa_Utils::sendNewPacket(serialReceived);
shouldSendToLoRa = false;
}

View File

@ -83,7 +83,7 @@ namespace BME_Utils {
}
}
if (!wxModuleFound) {
show_display("ERROR", "BME/BMP sensor active", "but no sensor found...", 2000);
displayShow("ERROR", "BME/BMP sensor active", "but no sensor found...", 2000);
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "BME", " BME/BMP sensor Active in config but not found! Check Wiring");
} else {
switch (wxModuleType) {

View File

@ -20,7 +20,7 @@ namespace BUTTON_Utils {
}
void doublePress() {
display_toggle(true);
displayToggle(true);
menuTime = millis();
if (menuDisplay == 0) {
menuDisplay = 1;

View File

@ -111,7 +111,7 @@ void Configuration::readFile(fs::FS &fs, const char *fileName) {
bool Configuration::validateConfigFile(const String& currentBeaconCallsign) {
if (currentBeaconCallsign.indexOf("NOCALL") != -1) {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "Config", "Change all your callsigns in 'data/tracker_config.json' and upload it via 'Upload File System image'");
show_display("ERROR", "Callsigns = NOCALL!", "---> change it !!!", 2000);
displayShow("ERROR", "Callsigns = NOCALL!", "---> change it !!!", 2000);
return true;
} else {
return false;

View File

@ -82,7 +82,7 @@ String fillStringLength(const String& line, uint8_t length) {
return outputLine;
}
void setup_display() {
void displaySetup() {
delay(500);
#ifdef HAS_TFT
tft.init();
@ -137,7 +137,7 @@ void setup_display() {
#endif
}
void display_toggle(bool toggle) {
void displayToggle(bool toggle) {
if (toggle) {
#ifdef HAS_TFT
digitalWrite(TFT_BL, HIGH);
@ -161,7 +161,7 @@ void display_toggle(bool toggle) {
}
}
void show_display(const String& header, const String& line1, const String& line2, int wait) {
void displayShow(const String& header, const String& line1, const String& line2, int wait) {
#ifdef HAS_TFT
String filledLine1 = fillStringLength(line1, 22);
String filledLine2 = fillStringLength(line2, 22);
@ -205,7 +205,7 @@ void show_display(const String& header, const String& line1, const String& line2
delay(wait);
}
void show_display(const String& header, const String& line1, const String& line2, const String& line3, const String& line4, const String& line5, int wait) {
void displayShow(const String& header, const String& line1, const String& line2, const String& line3, const String& line4, const String& line5, int wait) {
#ifdef HAS_TFT
String filledLine1 = fillStringLength(line1, 22);
String filledLine2 = fillStringLength(line2, 22);
@ -327,7 +327,7 @@ void startupScreen(uint8_t index, const String& version) {
case 1: workingFreq += "PL]"; break;
case 2: workingFreq += "UK]"; break;
}
show_display(" LoRa APRS", " (TRACKER)", workingFreq, "", "", " CA2RXU " + version, 4000);
displayShow(" LoRa APRS", " (TRACKER)", workingFreq, "", "", " CA2RXU " + version, 4000);
#ifdef HAS_TFT
cleanTFT();
#endif

View File

@ -1,12 +1,12 @@
#ifndef DISPLAY_H_
#define DISPLAY_H_
void setup_display();
void display_toggle(bool toggle);
void displaySetup();
void displayToggle(bool toggle);
void cleanTFT();
void show_display(const String& header, const String& line1, const String& line2, int wait = 0);
void show_display(const String& header, const String& line1, const String& line2, const String& line3, const String& line4, const String& line5, int wait = 0);
void displayShow(const String& header, const String& line1, const String& line2, int wait = 0);
void displayShow(const String& header, const String& line1, const String& line2, const String& line3, const String& line4, const String& line5, int wait = 0);
void startupScreen(uint8_t index, const String& version);

View File

@ -110,7 +110,7 @@ namespace GPS_Utils {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "GPS",
"No GPS frames detected! Try to reset the GPS Chip with this "
"firmware: https://github.com/richonguzman/TTGO_T_BEAM_GPS_RESET");
show_display("ERROR", "No GPS frames!", "Reset the GPS Chip", 2000);
displayShow("ERROR", "No GPS frames!", "Reset the GPS Chip", 2000);
}
}

View File

@ -164,7 +164,7 @@ namespace KEYBOARD_Utils {
sendUpdate = true;
if (!gpsIsActive) SLEEP_Utils::gpsWakeUp();
} else {
display_toggle(true);
displayToggle(true);
displayTime = millis();
displayState = true;
}
@ -330,12 +330,12 @@ namespace KEYBOARD_Utils {
} else {
myBeaconsIndex++;
}
display_toggle(true);
displayToggle(true);
displayTime = millis();
statusState = true;
statusTime = millis();
winlinkCommentState = false;
show_display("__ INFO __", "", " CHANGING CALLSIGN!", "", "-----> " + Config.beacons[myBeaconsIndex].callsign, "", 2000);
displayShow("__ INFO __", "", " CHANGING CALLSIGN!", "", "-----> " + Config.beacons[myBeaconsIndex].callsign, "", 2000);
STATION_Utils::saveIndex(0, myBeaconsIndex);
if (menuDisplay == 200) {
menuDisplay = 20;
@ -351,28 +351,28 @@ namespace KEYBOARD_Utils {
}
} else if (menuDisplay == 120) {
MSG_Utils::deleteFile(0);
show_display("___INFO___", "", "ALL MESSAGES DELETED!", 2000);
displayShow("___INFO___", "", "ALL MESSAGES DELETED!", 2000);
MSG_Utils::loadNumMessages();
menuDisplay = 12;
} else if (menuDisplay == 130) {
if (keyDetected) {
menuDisplay = 1300;
} else {
show_display(" APRS Thu.", "Sending:", "Happy #APRSThursday", "from LoRa Tracker 73!", "", "", 2000);
displayShow(" APRS Thu.", "Sending:", "Happy #APRSThursday", "from LoRa Tracker 73!", "", "", 2000);
MSG_Utils::addToOutputBuffer(0, "ANSRVR", "CQ HOTG Happy #APRSThursday from LoRa Tracker 73!");
}
} else if (menuDisplay == 131) {
if (keyDetected) {
menuDisplay = 1310;
} else {
show_display(" APRS Thu.", "Sending:", "Happy #APRSThursday", "from LoRa Tracker 73!", "", "", 2000);
displayShow(" APRS Thu.", "Sending:", "Happy #APRSThursday", "from LoRa Tracker 73!", "", "", 2000);
MSG_Utils::addToOutputBuffer(0, "APRSPH" , "HOTG Happy #APRSThursday from LoRa Tracker 73!");
}
} else if (menuDisplay == 132) {
show_display(" APRS Thu.", "", " Unsubscribe", " from APRS Thursday", "", "", 2000);
displayShow(" APRS Thu.", "", " Unsubscribe", " from APRS Thursday", "", "", 2000);
MSG_Utils::addToOutputBuffer(0, "ANSRVR", "U HOTG");
} else if (menuDisplay == 133) {
show_display(" APRS Thu.", "", " Keep Subscribed" ," for 12hours more", "", "", 2000);
displayShow(" APRS Thu.", "", " Keep Subscribed" ," for 12hours more", "", "", 2000);
MSG_Utils::addToOutputBuffer(0, "ANSRVR", "K HOTG");
}
@ -383,25 +383,25 @@ namespace KEYBOARD_Utils {
} else if (menuDisplay == 220) {
if (!displayEcoMode) {
displayEcoMode = true;
show_display("_DISPLAY__", "", " ECO MODE -> ON", 1000);
displayShow("_DISPLAY__", "", " ECO MODE -> ON", 1000);
} else {
displayEcoMode = false;
show_display("_DISPLAY__", "", " ECO MODE -> OFF", 1000);
displayShow("_DISPLAY__", "", " ECO MODE -> OFF", 1000);
}
} else if (menuDisplay == 221) {
if (screenBrightness ==1) {
show_display("_SCREEN___", "", "SCREEN BRIGHTNESS MAX", 1000);
displayShow("_SCREEN___", "", "SCREEN BRIGHTNESS MAX", 1000);
screenBrightness = 255;
} else {
show_display("_SCREEN___", "", "SCREEN BRIGHTNESS MIN", 1000);
displayShow("_SCREEN___", "", "SCREEN BRIGHTNESS MIN", 1000);
screenBrightness = 1;
}
} else if (menuDisplay == 240) {
show_display("_STATUS___", "", "WRITE STATUS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
displayShow("_STATUS___", "", "WRITE STATUS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
} else if (menuDisplay == 241) {
show_display("_STATUS___", "", "SELECT STATUS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
displayShow("_STATUS___", "", "SELECT STATUS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
} else if (menuDisplay == 250) {
show_display("_NOTIFIC__", "", "NOTIFICATIONS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
displayShow("_NOTIFIC__", "", "NOTIFICATIONS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
}
else if (menuDisplay == 4) {
@ -426,10 +426,10 @@ namespace KEYBOARD_Utils {
} else if (menuDisplay == 53) {
if (winlinkCommentState) {
winlinkCommentState = false;
show_display("_WINLINK_>", "", " WLNK COMMENTs OFF!", 2000);
displayShow("_WINLINK_>", "", " WLNK COMMENTs OFF!", 2000);
} else {
winlinkCommentState = true;
show_display("_WINLINK_>", "", " WLNK COMMENTs ON!", 2000);
displayShow("_WINLINK_>", "", " WLNK COMMENTs ON!", 2000);
}
} else if (menuDisplay == 5000) {
MSG_Utils::addToOutputBuffer(1, "WLNK-1", "L");
@ -446,7 +446,7 @@ namespace KEYBOARD_Utils {
menuDisplay = 50111;
} else if (menuDisplay == 50111) {
MSG_Utils::deleteFile(1);
show_display("___INFO___", "", " ALL MAILS DELETED!", 2000);
displayShow("___INFO___", "", " ALL MAILS DELETED!", 2000);
MSG_Utils::loadNumMessages();
if (winlinkStatus == 0) {
menuDisplay = 52;
@ -492,32 +492,32 @@ namespace KEYBOARD_Utils {
} else if (menuDisplay == 60) {
if (Config.notification.ledFlashlight) {
if (flashlight) {
show_display("__EXTRAS__", ""," Flashlight"," Status --> OFF", "", "", 2000);
displayShow("__EXTRAS__", ""," Flashlight"," Status --> OFF", "", "", 2000);
flashlight = false;
} else {
show_display("__EXTRAS__", ""," Flashlight"," Status --> ON", "", "", 2000);
displayShow("__EXTRAS__", ""," Flashlight"," Status --> ON", "", "", 2000);
flashlight = true;
}
} else {
show_display("__EXTRAS__", ""," Flashlight","NOT ACTIVE IN CONFIG!", "", "", 2000);
displayShow("__EXTRAS__", ""," Flashlight","NOT ACTIVE IN CONFIG!", "", "", 2000);
}
} else if (menuDisplay == 61) {
if (digirepeaterActive) {
show_display("__EXTRAS__", ""," DigiRepeater"," Status --> OFF", "", "", 2000);
displayShow("__EXTRAS__", ""," DigiRepeater"," Status --> OFF", "", "", 2000);
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "DigiRepeater OFF");
digirepeaterActive = false;
} else {
show_display("__EXTRAS__", ""," DigiRepeater"," Status --> ON","", "", 2000);
displayShow("__EXTRAS__", ""," DigiRepeater"," Status --> ON","", "", 2000);
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "DigiRepeater ON");
digirepeaterActive = true;
}
} else if (menuDisplay == 62) {
if (sosActive) {
show_display("__EXTRAS__", ""," S.O.S."," Status --> OFF", "", "", 2000);
displayShow("__EXTRAS__", ""," S.O.S."," Status --> OFF", "", "", 2000);
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "S.O.S Mode OFF");
sosActive = false;
} else {
show_display("__EXTRAS__", ""," S.O.S."," Status --> ON", "", "", 2000);
displayShow("__EXTRAS__", ""," S.O.S."," Status --> ON", "", "", 2000);
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "S.O.S Mode ON");
sosActive = true;
}
@ -531,7 +531,7 @@ namespace KEYBOARD_Utils {
menuTime = millis();
/* 181 -> up / 182 -> down / 180 <- back / 183 -> forward / 8 Delete / 13 Enter / 32 Space / 27 Esc */
if (!displayState) {
display_toggle(true);
displayToggle(true);
displayTime = millis();
displayState = true;
}
@ -596,14 +596,14 @@ namespace KEYBOARD_Utils {
messageText = messageText.substring(0, messageText.length() - 1);
}
} else if (menuDisplay == 260 && key == 13) {
show_display("", "", " REBOOTING ...", 2000);
displayShow("", "", " REBOOTING ...", 2000);
ESP.restart();
} else if (menuDisplay == 270 && key == 13) {
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
show_display("", "", " POWER OFF ...", 2000);
displayShow("", "", " POWER OFF ...", 2000);
POWER_Utils::shutdown();
#else
show_display("", "", "ESP32 CAN'T POWER OFF", 2000);
displayShow("", "", "ESP32 CAN'T POWER OFF", 2000);
#endif
} else if ((menuDisplay == 5021 || menuDisplay == 5031 || menuDisplay == 5041 || menuDisplay == 5051) && key >= 48 && key <= 57) {
winlinkMailNumber = key;
@ -750,7 +750,7 @@ namespace KEYBOARD_Utils {
}
String packet = APRSPacketLib::generateGPSBeaconPacket(currentBeacon->callsign, "APLRT1", Config.path, currentBeacon->overlay, APRSPacketLib::encodeGPS(gps.location.lat(),gps.location.lng(), gps.course.deg(), gps.speed.knots(), currentBeacon->symbol, Config.sendAltitude, gps.altitude.feet(), sendStandingUpdate, "GPS"));
packet += messageText;
show_display("<<< TX >>>", "", packet,100);
displayShow("<<< TX >>>", "", packet,100);
LoRa_Utils::sendNewPacket(packet);
messageText = "";
menuDisplay = 63;

View File

@ -75,7 +75,7 @@ namespace LoRa_Utils {
currentLoRainfo += String(currentLoRaType->codingRate4);
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "LoRa", currentLoRainfo.c_str());
show_display("LORA FREQ>", "", "CHANGED TO: " + loraCountryFreq, "", "", "", 2000);
displayShow("LORA FREQ>", "", "CHANGED TO: " + loraCountryFreq, "", "", "", 2000);
}
void setup() {

View File

@ -96,129 +96,129 @@ namespace MENU_Utils {
}
switch (menuDisplay) { // Graphic Menu is in here!!!!
case 1: // 1. Messages
show_display("__MENU____"," 6.Extras", "> 1.Messages", " 2.Configuration", " 3.Stations", lastLine);
displayShow("__MENU____"," 6.Extras", "> 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);
displayShow("__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);
displayShow("__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.Extras", lastLine);
displayShow("__MENU____", " 3.Stations", "> 4.Weather Report", " 5.Winlink/Mail", " 6.Extras", lastLine);
break;
case 5: //5. Winlink
show_display("__MENU____", " 4.Weather Report", "> 5.Winlink/Mail", " 6.Extras", " 1.Messages", lastLine);
displayShow("__MENU____", " 4.Weather Report", "> 5.Winlink/Mail", " 6.Extras", " 1.Messages", lastLine);
break;
case 6: //6. Extras
show_display("__MENU____", " 5.Winlink/Mail", "> 6.Extras", " 1.Messages", " 2.Configuration", lastLine);
displayShow("__MENU____", " 5.Winlink/Mail", "> 6.Extras", " 1.Messages", " 2.Configuration", lastLine);
break;
//////////
case 10: // 1.Messages ---> Messages Read
show_display("_MESSAGES_", "> Read (" + String(MSG_Utils::getNumAPRSMessages()) + ")", " Write", " Delete", " APRSThursday", lastLine);
displayShow("_MESSAGES_", "> Read (" + String(MSG_Utils::getNumAPRSMessages()) + ")", " Write", " Delete", " APRSThursday", lastLine);
break;
case 100: // 1.Messages ---> Messages Read ---> Display Received/Saved APRS Messages
{
String msgSender = loadedAPRSMessages[messagesIterator].substring(0, loadedAPRSMessages[messagesIterator].indexOf(","));
String msgText = loadedAPRSMessages[messagesIterator].substring(loadedAPRSMessages[messagesIterator].indexOf(",") + 1);
show_display("MSG_APRS>", "From --> " + msgSender, msgText, "", "", " Next=Down");
displayShow("MSG_APRS>", "From --> " + msgSender, msgText, "", "", " Next=Down");
}
break;
case 11: // 1.Messages ---> Messages Write
show_display("_MESSAGES_", " Read (" + String(MSG_Utils::getNumAPRSMessages()) + ")", "> Write", " Delete", " APRSThursday", lastLine);
displayShow("_MESSAGES_", " Read (" + String(MSG_Utils::getNumAPRSMessages()) + ")", "> Write", " Delete", " APRSThursday", lastLine);
break;
case 110: // 1.Messages ---> Messages Write ---> Write
if (keyDetected) {
show_display("WRITE_MSG>", "", "CALLSIGN = " + String(messageCallsign), "", "", "<Back Enter>");
displayShow("WRITE_MSG>", "", "CALLSIGN = " + String(messageCallsign), "", "", "<Back Enter>");
} else {
show_display("WRITE_MSG>", "", "No Keyboard Detected", "Can't write Message", "", "1P = Back");
displayShow("WRITE_MSG>", "", "No Keyboard Detected", "Can't write Message", "", "1P = Back");
}
break;
case 111:
if (messageText.length() <= 67) {
if (messageText.length() < 10) {
show_display("WRITE_MSG>", "CALLSIGN -> " + messageCallsign, "MSG -> " + messageText, "", "", "<Back (0" + String(messageText.length()) + ") Enter>");
displayShow("WRITE_MSG>", "CALLSIGN -> " + messageCallsign, "MSG -> " + messageText, "", "", "<Back (0" + String(messageText.length()) + ") Enter>");
} else {
show_display("WRITE_MSG>", "CALLSIGN -> " + messageCallsign, "MSG -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ") Enter>");
displayShow("WRITE_MSG>", "CALLSIGN -> " + messageCallsign, "MSG -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ") Enter>");
}
} else {
show_display("WRITE_MSG>", "--- MSG TO LONG! ---", " -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ")");
displayShow("WRITE_MSG>", "--- MSG TO LONG! ---", " -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ")");
}
break;
case 12: // 1.Messages ---> Messages Delete
show_display("_MESSAGES_", " Read (" + String(MSG_Utils::getNumAPRSMessages()) + ")", " Write", "> Delete", " APRSThursday", lastLine);
displayShow("_MESSAGES_", " Read (" + String(MSG_Utils::getNumAPRSMessages()) + ")", " Write", "> Delete", " APRSThursday", lastLine);
break;
case 120: // 1.Messages ---> Messages Delete ---> Delete: ALL
show_display("DELETE_MSG", "", " DELETE APRS MSG?", "", "", " Confirm = LP or '>'");
displayShow("DELETE_MSG", "", " DELETE APRS MSG?", "", "", " Confirm = LP or '>'");
break;
case 13: // 1.Messages ---> APRSThursday
show_display("_MESSAGES_", " Read (" + String(MSG_Utils::getNumAPRSMessages()) + ")", " Write", " Delete", "> APRSThursday", lastLine);
displayShow("_MESSAGES_", " Read (" + String(MSG_Utils::getNumAPRSMessages()) + ")", " Write", " Delete", "> APRSThursday", lastLine);
break;
case 130: // 1.Messages ---> APRSThursday ---> Delete: ALL
show_display("APRS Thu._", "> Join APRSThursday", " Check In", " Unsubscribe", " KeepSubscribed+12h", lastLine);
displayShow("APRS Thu._", "> Join APRSThursday", " Check In", " Unsubscribe", " KeepSubscribed+12h", lastLine);
break;
case 1300:
if (messageText.length() <= 67) {
if (messageText.length() < 10) {
show_display("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", "<Back (0" + String(messageText.length()) + ") Enter>");
displayShow("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", "<Back (0" + String(messageText.length()) + ") Enter>");
} else {
show_display("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ") Enter>");
displayShow("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ") Enter>");
}
} else {
show_display("WRITE_MSG>", "--- MSG TO LONG! ---", " -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ")");
displayShow("WRITE_MSG>", "--- MSG TO LONG! ---", " -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ")");
}
break;
case 131: // 1.Messages ---> APRSThursday ---> Delete: ALL
show_display("APRS Thu._", " Join APRSThursday", "> Check In", " Unsubscribe", " KeepSubscribed+12h", lastLine);
displayShow("APRS Thu._", " Join APRSThursday", "> Check In", " Unsubscribe", " KeepSubscribed+12h", lastLine);
break;
case 1310:
if (messageText.length() <= 67) {
if (messageText.length() < 10) {
show_display("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", "<Back (0" + String(messageText.length()) + ") Enter>");
displayShow("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", "<Back (0" + String(messageText.length()) + ") Enter>");
} else {
show_display("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ") Enter>");
displayShow("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ") Enter>");
}
} else {
show_display("WRITE_MSG>", "--- MSG TO LONG! ---", " -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ")");
displayShow("WRITE_MSG>", "--- MSG TO LONG! ---", " -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ")");
}
break;
case 132: // 1.Messages ---> APRSThursday ---> Delete: ALL
show_display("APRS Thu._", " Join APRSThursday", " Check In", "> Unsubscribe", " KeepSubscribed+12h", lastLine);
displayShow("APRS Thu._", " Join APRSThursday", " Check In", "> Unsubscribe", " KeepSubscribed+12h", lastLine);
break;
case 133: // 1.Messages ---> APRSThursday ---> Delete: ALL
show_display("APRS Thu._", " Join APRSThursday", " Check In", " Unsubscribe", "> KeepSubscribed+12h", lastLine);
displayShow("APRS Thu._", " Join APRSThursday", " Check In", " Unsubscribe", "> KeepSubscribed+12h", lastLine);
break;
//////////
case 20: // 2.Configuration ---> Callsign
show_display("_CONFIG___", " Power Off", "> Change Callsign ", " Change Frequency", " Display",lastLine);
displayShow("_CONFIG___", " Power Off", "> Change Callsign ", " Change Frequency", " Display",lastLine);
break;
case 21: // 2.Configuration ---> Change Freq
show_display("_CONFIG___", " Change Callsign ", "> Change Frequency", " Display", " " + checkBTType() + " (" + checkProcessActive(bluetoothActive) + ")",lastLine);
displayShow("_CONFIG___", " Change Callsign ", "> Change Frequency", " Display", " " + checkBTType() + " (" + checkProcessActive(bluetoothActive) + ")",lastLine);
break;
case 22: // 2.Configuration ---> Display
show_display("_CONFIG___", " Change Frequency", "> Display", " " + checkBTType() + " (" + checkProcessActive(bluetoothActive) + ")", " Status",lastLine);
displayShow("_CONFIG___", " Change Frequency", "> Display", " " + checkBTType() + " (" + checkProcessActive(bluetoothActive) + ")", " Status",lastLine);
break;
case 23: // 2.Configuration ---> Bluetooth
show_display("_CONFIG___", " Display", "> " + checkBTType() + " (" + checkProcessActive(bluetoothActive) + ")", " Status", " Notifications", lastLine);
displayShow("_CONFIG___", " Display", "> " + checkBTType() + " (" + checkProcessActive(bluetoothActive) + ")", " Status", " Notifications", lastLine);
break;
case 24: // 2.Configuration ---> Status
show_display("_CONFIG___", " " + checkBTType() + " (" + checkProcessActive(bluetoothActive) + ")", "> Status"," Notifications", " Reboot",lastLine);
displayShow("_CONFIG___", " " + checkBTType() + " (" + checkProcessActive(bluetoothActive) + ")", "> Status"," Notifications", " Reboot",lastLine);
break;
case 25: // 2.Configuration ---> Notifications
show_display("_CONFIG___", " Status", "> Notifications", " Reboot", " Power Off",lastLine);
displayShow("_CONFIG___", " Status", "> Notifications", " Reboot", " Power Off",lastLine);
break;
case 26: // 2.Configuration ---> Reboot
show_display("_CONFIG___", " Notifications", "> Reboot", " Power Off", " Change Callsign",lastLine);
displayShow("_CONFIG___", " Notifications", "> Reboot", " Power Off", " Change Callsign",lastLine);
break;
case 27: // 2.Configuration ---> Power Off
show_display("_CONFIG___", " Reboot", "> Power Off", " Change Callsign", " Change Frequency",lastLine);
displayShow("_CONFIG___", " Reboot", "> Power Off", " Change Callsign", " Change Frequency",lastLine);
break;
case 200: // 2.Configuration ---> Change Callsign
show_display("_CALLSIGN_", ""," Confirm Change?","","","<Back Select>");
displayShow("_CALLSIGN_", ""," Confirm Change?","","","<Back Select>");
break;
case 210: // 2.Configuration ---> Change Frequency
@ -227,59 +227,59 @@ namespace MENU_Utils {
case 1: freqChangeWarning = " PL --> UK"; break;
case 2: freqChangeWarning = " UK --> Eu"; break;
}
show_display("LORA__FREQ", ""," Confirm Change?", freqChangeWarning, "", "<Back Select>");
displayShow("LORA__FREQ", ""," Confirm Change?", freqChangeWarning, "", "<Back Select>");
break;
case 220: // 2.Configuration ---> Display ---> ECO Mode
show_display("_DISPLAY__", "", "> ECO Mode (" + checkProcessActive(displayEcoMode) + ")"," Brightness (" + screenBrightnessAsString(screenBrightness) + ")","",lastLine);
displayShow("_DISPLAY__", "", "> ECO Mode (" + checkProcessActive(displayEcoMode) + ")"," Brightness (" + screenBrightnessAsString(screenBrightness) + ")","",lastLine);
break;
case 221: // 2.Configuration ---> Display ---> Brightness
show_display("_DISPLAY__", "", " ECO Mode (" + checkProcessActive(displayEcoMode) + ")","> Brightness (" + screenBrightnessAsString(screenBrightness) + ")","",lastLine);
displayShow("_DISPLAY__", "", " ECO Mode (" + checkProcessActive(displayEcoMode) + ")","> Brightness (" + screenBrightnessAsString(screenBrightness) + ")","",lastLine);
break;
case 230:
if (bluetoothActive) {
bluetoothActive = false;
show_display("BLUETOOTH", "", " Bluetooth --> OFF", 1000);
displayShow("BLUETOOTH", "", " Bluetooth --> OFF", 1000);
} else {
bluetoothActive = true;
show_display("BLUETOOTH", "", " Bluetooth --> ON", 1000);
displayShow("BLUETOOTH", "", " Bluetooth --> ON", 1000);
}
menuDisplay = 23;
break;
case 240: // 2.Configuration ---> Status
show_display("_STATUS___", "", "> Write"," Select","",lastLine);
displayShow("_STATUS___", "", "> Write"," Select","",lastLine);
break;
case 241: // 2.Configuration ---> Status
show_display("_STATUS___", "", " Write","> Select","",lastLine);
displayShow("_STATUS___", "", " Write","> Select","",lastLine);
break;
case 250: // 2.Configuration ---> Notifications
show_display("_NOTIFIC__", "> Turn Off Sound/Led","","","",lastLine);
displayShow("_NOTIFIC__", "> Turn Off Sound/Led","","","",lastLine);
break;
case 260: // 2.Configuration ---> Reboot
if (keyDetected) {
show_display("_REBOOT?__", "","Confirm Reboot...","","","<Back Enter=Confirm");
displayShow("_REBOOT?__", "","Confirm Reboot...","","","<Back Enter=Confirm");
} else {
show_display("_REBOOT?__", "no Keyboard Detected"," Use RST Button to","Reboot Tracker","",lastLine);
displayShow("_REBOOT?__", "no Keyboard Detected"," Use RST Button to","Reboot Tracker","",lastLine);
}
break;
case 270: // 2.Configuration ---> Power Off
if (keyDetected) {
show_display("POWER_OFF?", "","Confirm Power Off...","","","<Back Enter=Confirm");
displayShow("POWER_OFF?", "","Confirm Power Off...","","","<Back Enter=Confirm");
} else {
show_display("POWER_OFF?", "no Keyboard Detected"," Use PWR Button to","Power Off Tracker","",lastLine);
displayShow("POWER_OFF?", "no Keyboard Detected"," Use PWR Button to","Power Off Tracker","",lastLine);
}
break;
//////////
case 30: //3.Stations ---> Packet Decoder
show_display("STATIONS>", "", "> Packet Decoder", " Near By Stations", "", "<Back");
displayShow("STATIONS>", "", "> Packet Decoder", " Near By Stations", "", "<Back");
break;
case 31: //3.Stations ---> Near By Stations
show_display("STATIONS>", "", " Packet Decoder", "> Near By Stations", "", "<Back");
displayShow("STATIONS>", "", " Packet Decoder", "> Near By Stations", "", "<Back");
break;
case 300: //3.Stations ---> Packet Decoder
@ -319,20 +319,20 @@ namespace MENU_Utils {
}
pathDec += lastReceivedPacket.path;
show_display(firstLineDecoder, "GPS " + String(lastReceivedPacket.latitude,3) + " " + String(lastReceivedPacket.longitude,3), courseSpeedAltitude, "D:" + String(distanceKm) + "km " + String(courseTo,0), pathDec, "< RSSI:" + String(lastReceivedPacket.rssi) + " SNR:" + String(lastReceivedPacket.snr));
displayShow(firstLineDecoder, "GPS " + String(lastReceivedPacket.latitude,3) + " " + String(lastReceivedPacket.longitude,3), courseSpeedAltitude, "D:" + String(distanceKm) + "km " + String(courseTo,0), pathDec, "< RSSI:" + String(lastReceivedPacket.rssi) + " SNR:" + String(lastReceivedPacket.snr));
} else if (lastReceivedPacket.type == 1) { // message
show_display(firstLineDecoder, "ADDRESSEE: " + lastReceivedPacket.addressee, "MSG: " + lastReceivedPacket.message, "", "", "< RSSI:" + String(lastReceivedPacket.rssi) + " SNR:" + String(lastReceivedPacket.snr));
displayShow(firstLineDecoder, "ADDRESSEE: " + lastReceivedPacket.addressee, "MSG: " + lastReceivedPacket.message, "", "", "< RSSI:" + String(lastReceivedPacket.rssi) + " SNR:" + String(lastReceivedPacket.snr));
} else if (lastReceivedPacket.type == 2) { // status
show_display(firstLineDecoder, "-------STATUS-------", lastReceivedPacket.message, "", "", "< RSSI:" + String(lastReceivedPacket.rssi) + " SNR:" + String(lastReceivedPacket.snr));
displayShow(firstLineDecoder, "-------STATUS-------", lastReceivedPacket.message, "", "", "< RSSI:" + String(lastReceivedPacket.rssi) + " SNR:" + String(lastReceivedPacket.snr));
} else if (lastReceivedPacket.type == 3) { // telemetry
show_display(firstLineDecoder, "------TELEMETRY------", "", "", "", "< RSSI:" + String(lastReceivedPacket.rssi) + " SNR:" + String(lastReceivedPacket.snr));
displayShow(firstLineDecoder, "------TELEMETRY------", "", "", "", "< RSSI:" + String(lastReceivedPacket.rssi) + " SNR:" + String(lastReceivedPacket.snr));
} else if (lastReceivedPacket.type == 5) { // object
show_display(firstLineDecoder, "-------OBJECT-------", "", "", "", "< RSSI:" + String(lastReceivedPacket.rssi) + " SNR:" + String(lastReceivedPacket.snr));
displayShow(firstLineDecoder, "-------OBJECT-------", "", "", "", "< RSSI:" + String(lastReceivedPacket.rssi) + " SNR:" + String(lastReceivedPacket.snr));
}
}
break;
case 310: //3.Stations ---> Near By Stations
show_display("NEAR BY >", STATION_Utils::getNearTracker(0), STATION_Utils::getNearTracker(1), STATION_Utils::getNearTracker(2), STATION_Utils::getNearTracker(3), "<Back");
displayShow("NEAR BY >", STATION_Utils::getNearTracker(0), STATION_Utils::getNearTracker(1), STATION_Utils::getNearTracker(2), STATION_Utils::getNearTracker(3), "<Back");
break;
//////////
@ -345,130 +345,130 @@ namespace MENU_Utils {
if (winlinkStatus == 5) {
menuDisplay = 5000;
} else {
show_display("_WINLINK_>", "> Login" , " Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", " Delete SavedMails", " Wnlk Comment (" + checkProcessActive(winlinkCommentState) + ")" , lastLine);
displayShow("_WINLINK_>", "> Login" , " Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", " Delete SavedMails", " Wnlk Comment (" + checkProcessActive(winlinkCommentState) + ")" , lastLine);
}
break;
case 51: // 5.Winlink
show_display("_WINLINK_>", " Login" , "> Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", " Delete SavedMails", " Wnlk Comment (" + checkProcessActive(winlinkCommentState) + ")" , lastLine);
displayShow("_WINLINK_>", " Login" , "> Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", " Delete SavedMails", " Wnlk Comment (" + checkProcessActive(winlinkCommentState) + ")" , lastLine);
break;
case 52: // 5.Winlink
show_display("_WINLINK_>", " Login" , " Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", "> Delete SavedMails", " Wnlk Comment (" + checkProcessActive(winlinkCommentState) + ")" , lastLine);
displayShow("_WINLINK_>", " Login" , " Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", "> Delete SavedMails", " Wnlk Comment (" + checkProcessActive(winlinkCommentState) + ")" , lastLine);
break;
case 53: // 5.Winlink
show_display("_WINLINK_>", " Login" , " Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", " Delete SavedMails", "> Wnlk Comment (" + checkProcessActive(winlinkCommentState) + ")" , lastLine);
displayShow("_WINLINK_>", " Login" , " Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", " Delete SavedMails", "> Wnlk Comment (" + checkProcessActive(winlinkCommentState) + ")" , lastLine);
break;
case 500: // 5.Winlink ---> Login
show_display("_WINLINK_>", "" , "Login Initiation ...", "Challenge -> waiting", "" , "");
displayShow("_WINLINK_>", "" , "Login Initiation ...", "Challenge -> waiting", "" , "");
break;
case 501: // 5.Winlink ---> Login
show_display("_WINLINK_>", "" , "Login Initiation ...", "Challenge -> sended", "" , "");
displayShow("_WINLINK_>", "" , "Login Initiation ...", "Challenge -> sended", "" , "");
break;
case 502: // 5.Winlink ---> Login
show_display("_WINLINK_>", "" , "Login Initiation ...", "Challenge -> ack ...", "" , "");
displayShow("_WINLINK_>", "" , "Login Initiation ...", "Challenge -> ack ...", "" , "");
break;
case 5000: // WINLINK: List Pend. Mail //
show_display("WLNK__MENU", " Write Mail" , "> List Pend. Mails", " Downloaded Mails", " Read Mail (R#)", lastLine);
displayShow("WLNK__MENU", " Write Mail" , "> List Pend. Mails", " Downloaded Mails", " Read Mail (R#)", lastLine);
break;
case 5010: // WINLINK: Downloaded Mails //
show_display("WLNK__MENU", " List Pend. Mails", "> Downloaded Mails", " Read Mail (R#)", " Reply Mail (Y#)", lastLine);
displayShow("WLNK__MENU", " List Pend. Mails", "> Downloaded Mails", " Read Mail (R#)", " Reply Mail (Y#)", lastLine);
break;
case 50100: // WINLINK: Downloaded Mails //
show_display("_WINLINK_>", "" , "> Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", " Delete SavedMails", "" , lastLine);
displayShow("_WINLINK_>", "" , "> Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", " Delete SavedMails", "" , lastLine);
break;
case 50101: // WINLINK: Downloaded Mails //
{
String mailText = loadedWLNKMails[messagesIterator];
show_display("WLNK__MAIL", "", mailText, "", "", " Next=Down");
displayShow("WLNK__MAIL", "", mailText, "", "", " Next=Down");
}
break;
case 50110: // WINLINK: Downloaded Mails //
show_display("_WINLINK_>", "" , " Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", "> Delete SavedMails", "" , lastLine);
displayShow("_WINLINK_>", "" , " Read SavedMails(" + String(MSG_Utils::getNumWLNKMails()) + ")", "> Delete SavedMails", "" , lastLine);
break;
case 50111: // WINLINK: Downloaded Mails //
show_display("WLNK__DEL", "", " DELETE ALL MAILS?", "", "", " Confirm = LP or '>'");
displayShow("WLNK__DEL", "", " DELETE ALL MAILS?", "", "", " Confirm = LP or '>'");
break;
case 5020: // WINLINK: Read Mail //
show_display("WLNK__MENU", " Downloaded Mails", "> Read Mail (R#)", " Reply Mail (Y#)", " Forward Mail (F#)", lastLine);
displayShow("WLNK__MENU", " Downloaded Mails", "> Read Mail (R#)", " Reply Mail (Y#)", " Forward Mail (F#)", lastLine);
break;
case 5021:
show_display("WLNK__READ", "", " READ MAIL N." + winlinkMailNumber, "", "", "<Back Enter>");
displayShow("WLNK__READ", "", " READ MAIL N." + winlinkMailNumber, "", "", "<Back Enter>");
break;
case 5030: // WINLINK: Reply Mail //
show_display("WLNK__MENU", " Read Mail (R#)", "> Reply Mail (Y#)", " Forward Mail (F#)", " Delete Mail (K#)", lastLine);
displayShow("WLNK__MENU", " Read Mail (R#)", "> Reply Mail (Y#)", " Forward Mail (F#)", " Delete Mail (K#)", lastLine);
break;
case 5031:
show_display("WLNK_REPLY", "", " REPLY MAIL N." + winlinkMailNumber , "", "", "<Back Enter>");
displayShow("WLNK_REPLY", "", " REPLY MAIL N." + winlinkMailNumber , "", "", "<Back Enter>");
break;
case 5040: // WINLINK: Foward Mail //
show_display("WLNK__MENU", " Reply Mail (Y#)", "> Forward Mail (F#)", " Delete Mail (K#)", " Alias Menu", lastLine);
displayShow("WLNK__MENU", " Reply Mail (Y#)", "> Forward Mail (F#)", " Delete Mail (K#)", " Alias Menu", lastLine);
break;
case 5041: // WINLINK: Forward Mail //
show_display("WLNK__FORW", "", " FORWARD MAIL N." + winlinkMailNumber , "", "", "<Back Enter>");
displayShow("WLNK__FORW", "", " FORWARD MAIL N." + winlinkMailNumber , "", "", "<Back Enter>");
break;
case 5042: // WINLINK: Forward Mail //
show_display("WLNK_FORW_", " FORWARD MAIL N." + winlinkMailNumber , "To = " + winlinkAddressee, "", "", "<Back Enter>");
displayShow("WLNK_FORW_", " FORWARD MAIL N." + winlinkMailNumber , "To = " + winlinkAddressee, "", "", "<Back Enter>");
break;
case 5050: // WINLINK: Delete Mail //
show_display("WLNK__MENU", " Forward Mail (F#)", "> Delete Mail (K#)", " Alias Menu", " Log Out", lastLine);
displayShow("WLNK__MENU", " Forward Mail (F#)", "> Delete Mail (K#)", " Alias Menu", " Log Out", lastLine);
break;
case 5051: // WINLINK: Delete Mail //
show_display("WLNK___DEL", "", " DELETE MAIL N." + winlinkMailNumber, "", "", "<Back Enter>");
displayShow("WLNK___DEL", "", " DELETE MAIL N." + winlinkMailNumber, "", "", "<Back Enter>");
break;
case 5060: // WINLINK: Alias Menu //
show_display("WLNK__MENU", " Delete Mail (K#)", "> Alias Menu", " Log Out", " Write Mail", lastLine);
displayShow("WLNK__MENU", " Delete Mail (K#)", "> Alias Menu", " Log Out", " Write Mail", lastLine);
break;
case 5061: // WINLINK: Alias Menu : Create Alias //
show_display("WLNK_ALIAS", "> Create Alias" , " Delete Alias ", " List All Alias", "", lastLine);
displayShow("WLNK_ALIAS", "> Create Alias" , " Delete Alias ", " List All Alias", "", lastLine);
break;
case 50610: // WINLINK: Alias Menu : Create Alias //
show_display("WLNK_ALIAS", "", "Write Alias to Create", " -> " + winlinkAlias, "", "<Back Enter>");
displayShow("WLNK_ALIAS", "", "Write Alias to Create", " -> " + winlinkAlias, "", "<Back Enter>");
break;
case 50611: // WINLINK: Alias Menu : Create Alias //
show_display("WLNK_ALIAS", "", " " + winlinkAlias + " =", winlinkAliasComplete, "", "<Back Enter>");
displayShow("WLNK_ALIAS", "", " " + winlinkAlias + " =", winlinkAliasComplete, "", "<Back Enter>");
break;
case 5062: // WINLINK: Alias Menu : Delete Alias //
show_display("WLNK_ALIAS", " Create Alias" , "> Delete Alias ", " List All Alias", "", lastLine);
displayShow("WLNK_ALIAS", " Create Alias" , "> Delete Alias ", " List All Alias", "", lastLine);
break;
case 50620: // WINLINK: Alias Menu : Delete Alias //
show_display("WLNK_ALIAS", "Write Alias to Delete", "", " -> " + winlinkAlias, "", "<Back Enter>");
displayShow("WLNK_ALIAS", "Write Alias to Delete", "", " -> " + winlinkAlias, "", "<Back Enter>");
break;
case 5063: // WINLINK: Alias Menu : List Alias//
show_display("WLNK_ALIAS", " Create Alias" , " Delete Alias ", "> List All Alias", "", lastLine);
displayShow("WLNK_ALIAS", " Create Alias" , " Delete Alias ", "> List All Alias", "", lastLine);
break;
case 5070: // WINLINK: Log Out MAIL //
show_display("WLNK__MENU", " Alias Menu", "> Log Out", " Write Mail", " List Pend. Mails", lastLine);
displayShow("WLNK__MENU", " Alias Menu", "> Log Out", " Write Mail", " List Pend. Mails", lastLine);
break;
case 5080: // WINLINK: WRITE MAIL //
show_display("WLNK__MENU", " Log Out", "> Write Mail", " List Pend. Mails", " Downloaded Mails", lastLine);
displayShow("WLNK__MENU", " Log Out", "> Write Mail", " List Pend. Mails", " Downloaded Mails", lastLine);
break;
case 5081: // WINLINK: WRITE MAIL: Addressee //
show_display("WLNK__MAIL", "--- Send Mail to ---", "", "-> " + winlinkAddressee, "", "<Back Enter>");
displayShow("WLNK__MAIL", "--- Send Mail to ---", "", "-> " + winlinkAddressee, "", "<Back Enter>");
break;
case 5082: // WINLINK: WRITE MAIL: Subject //
show_display("WLNK__MAIL", "--- Write Subject ---", "", "-> " + winlinkSubject, "", "<Back Enter>");
displayShow("WLNK__MAIL", "--- Write Subject ---", "", "-> " + winlinkSubject, "", "<Back Enter>");
break;
case 5083: // WINLINK: WRITE MAIL: Body //
if (winlinkBody.length() <= 67) {
show_display("WLNK__MAIL", "-- Body (lenght=" + String(winlinkBody.length()) + ")", "-> " + winlinkBody, "", "", "<Clear Body Enter>");
displayShow("WLNK__MAIL", "-- Body (lenght=" + String(winlinkBody.length()) + ")", "-> " + winlinkBody, "", "", "<Clear Body Enter>");
} else {
show_display("WLNK__MAIL", "-- Body To Long = " + String(winlinkBody.length()) + "!", "-> " + winlinkBody, "", "", "<Clear Body");
displayShow("WLNK__MAIL", "-- Body To Long = " + String(winlinkBody.length()) + "!", "-> " + winlinkBody, "", "", "<Clear Body");
}
break;
case 5084: // WINLINK: WRITE MAIL: End Mail? //
show_display("WLNK__MAIL", "", "> End Mail", " 1 More Line", "", " Up/Down Select>");
displayShow("WLNK__MAIL", "", "> End Mail", " 1 More Line", "", " Up/Down Select>");
break;
case 5085: // WINLINK: WRITE MAIL: One More Line(Body) //
show_display("WLNK__MAIL", "", " End Mail", "> 1 More Line", "", " Up/Down Select>");
displayShow("WLNK__MAIL", "", " End Mail", "> 1 More Line", "", " Up/Down Select>");
break;
// validar winlinkStatus = 0
@ -476,26 +476,26 @@ namespace MENU_Utils {
//////////
case 60: // 6. Extras ---> Flashlight
show_display("__EXTRAS__", "> Flashlight (" + checkProcessActive(flashlight) + ")", " DigiRepeater (" + checkProcessActive(digirepeaterActive) + ")", " S.O.S. (" + checkProcessActive(sosActive) + ")"," Send GPS + Comment",lastLine);
displayShow("__EXTRAS__", "> Flashlight (" + checkProcessActive(flashlight) + ")", " DigiRepeater (" + checkProcessActive(digirepeaterActive) + ")", " S.O.S. (" + checkProcessActive(sosActive) + ")"," Send GPS + Comment",lastLine);
break;
case 61: // 6. Extras ---> Digirepeater
show_display("__EXTRAS__", " Flashlight (" + checkProcessActive(flashlight) + ")", "> DigiRepeater (" + checkProcessActive(digirepeaterActive) + ")", " S.O.S. (" + checkProcessActive(sosActive) + ")"," Send GPS + Comment",lastLine);
displayShow("__EXTRAS__", " Flashlight (" + checkProcessActive(flashlight) + ")", "> DigiRepeater (" + checkProcessActive(digirepeaterActive) + ")", " S.O.S. (" + checkProcessActive(sosActive) + ")"," Send GPS + Comment",lastLine);
break;
case 62: // 6. Extras ---> S.O.S.
show_display("__EXTRAS__", " Flashlight (" + checkProcessActive(flashlight) + ")", " DigiRepeater (" + checkProcessActive(digirepeaterActive) + ")", "> S.O.S. (" + checkProcessActive(sosActive) + ")"," Send GPS + Comment",lastLine);
displayShow("__EXTRAS__", " Flashlight (" + checkProcessActive(flashlight) + ")", " DigiRepeater (" + checkProcessActive(digirepeaterActive) + ")", "> S.O.S. (" + checkProcessActive(sosActive) + ")"," Send GPS + Comment",lastLine);
break;
case 63: // 6. Extras ---> Extra Comment.
show_display("__EXTRAS__", " Flashlight (" + checkProcessActive(flashlight) + ")", " DigiRepeater (" + checkProcessActive(digirepeaterActive) + ")", " S.O.S. (" + checkProcessActive(sosActive) + ")","> Send GPS + Comment",lastLine);
displayShow("__EXTRAS__", " Flashlight (" + checkProcessActive(flashlight) + ")", " DigiRepeater (" + checkProcessActive(digirepeaterActive) + ")", " S.O.S. (" + checkProcessActive(sosActive) + ")","> Send GPS + Comment",lastLine);
break;
case 630:
if (messageText.length() <= 67) {
if (messageText.length() < 10) {
show_display("_COMMENT_>", "Send this Comment in","the next GPS Beacon :", messageText, "", "<Back (0" + String(messageText.length()) + ") Enter>");
displayShow("_COMMENT_>", "Send this Comment in","the next GPS Beacon :", messageText, "", "<Back (0" + String(messageText.length()) + ") Enter>");
} else {
show_display("_COMMENT_>", "Send this Comment in","the next GPS Beacon :", messageText, "", "<Back (" + String(messageText.length()) + ") Enter>");
displayShow("_COMMENT_>", "Send this Comment in","the next GPS Beacon :", messageText, "", "<Back (" + String(messageText.length()) + ") Enter>");
}
} else {
show_display("_COMMENT_>", " Comment is to long! ", " -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ")");
displayShow("_COMMENT_>", " Comment is to long! ", " -> " + messageText, "", "", "<Back (" + String(messageText.length()) + ")");
}
break;
@ -660,7 +660,7 @@ namespace MENU_Utils {
} else {
sixthRowMainMenu = "No Battery Connected" ;
}
show_display(firstRowMainMenu,
displayShow(firstRowMainMenu,
secondRowMainMenu,
thirdRowMainMenu,
fourthRowMainMenu,

View File

@ -136,7 +136,7 @@ namespace MSG_Utils {
fileToRead = SPIFFS.open("/aprsMessages.txt");
}
if (noAPRSMsgWarning) {
show_display("___INFO___", "", " NO APRS MSG SAVED", 1500);
displayShow("___INFO___", "", " NO APRS MSG SAVED", 1500);
} else {
if(!fileToRead) {
Serial.println("Failed to open file for reading");
@ -156,7 +156,7 @@ namespace MSG_Utils {
fileToRead = SPIFFS.open("/winlinkMails.txt");
}
if (noWLNKMsgWarning) {
show_display("___INFO___", "", " NO WLNK MAILS SAVED", 1500);
displayShow("___INFO___", "", " NO WLNK MAILS SAVED", 1500);
} else {
if(!fileToRead) {
Serial.println("Failed to open file for reading");
@ -243,16 +243,16 @@ namespace MSG_Utils {
cleanTFT();
#endif
if (textMessage.indexOf("ack") == 0 && station != "WLNK-1") { // don't show Winlink ACK
show_display("<<ACK Tx>>", "", "", 500);
displayShow("<<ACK Tx>>", "", "", 500);
} else if (station.indexOf("CA2RXU-15") == 0 && textMessage.indexOf("wrl") == 0) {
show_display("<WEATHER>","", "--- Sending Query ---", 1000);
displayShow("<WEATHER>","", "--- Sending Query ---", 1000);
wxRequestTime = millis();
wxRequestStatus = true;
} else {
if (station == "WLNK-1") {
show_display("WINLINK Tx", "", newPacket, 100);
displayShow("WINLINK Tx", "", newPacket, 100);
} else {
show_display("MSG Tx >>", "", newPacket, 100);
displayShow("MSG Tx >>", "", newPacket, 100);
}
}
LoRa_Utils::sendNewPacket(newPacket);
@ -488,7 +488,7 @@ namespace MSG_Utils {
sixthLineWR += windDegrees;
sixthLineWR += "deg)";
show_display("<WEATHER>", "From --> " + lastReceivedPacket.sender, place, summary, fifthLineWR, sixthLineWR);
displayShow("<WEATHER>", "From --> " + lastReceivedPacket.sender, place, summary, fifthLineWR, sixthLineWR);
menuDisplay = 40;
menuTime = millis();
} else if (lastReceivedPacket.sender == "WLNK-1") {
@ -517,22 +517,22 @@ namespace MSG_Utils {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Login Succesfull");
lastMsgRxTime = millis();
winlinkStatus = 5;
show_display("_WINLINK_>", "", " LOGGED !!!!", 2000);
displayShow("_WINLINK_>", "", " LOGGED !!!!", 2000);
menuDisplay = 5000;
} else if (winlinkStatus == 5 && lastReceivedPacket.message.indexOf("Log off successful") == 0 ) {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Log Out");
lastMsgRxTime = millis();
show_display("_WINLINK_>", "", " LOG OUT !!!", 2000);
displayShow("_WINLINK_>", "", " LOG OUT !!!", 2000);
winlinkStatus = 0;
} else if ((winlinkStatus == 5) && (lastReceivedPacket.message.indexOf("Log off successful") == -1) && (lastReceivedPacket.message.indexOf("Login valid") == -1) && (lastReceivedPacket.message.indexOf("Login [") == -1) && (lastReceivedPacket.message.indexOf("ack") == -1)) {
lastMsgRxTime = millis();
show_display("<WLNK Rx >", "", lastReceivedPacket.message, 3000);
displayShow("<WLNK Rx >", "", lastReceivedPacket.message, 3000);
saveNewMessage(1, lastReceivedPacket.sender, lastReceivedPacket.message);
}
} else {
if (!Config.simplifiedTrackerMode) {
lastMsgRxTime = millis();
show_display("< MSG Rx >", "From --> " + lastReceivedPacket.sender, "", lastReceivedPacket.message , "", "", 3000);
displayShow("< MSG Rx >", "From --> " + lastReceivedPacket.sender, "", lastReceivedPacket.message , "", "", 3000);
if (lastReceivedPacket.message.indexOf("ack") != 0) {
saveNewMessage(0, lastReceivedPacket.sender, lastReceivedPacket.message);
}

View File

@ -467,7 +467,7 @@ namespace POWER_Utils {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "SHUTDOWN !!!");
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
if (Config.notification.shutDownBeep) NOTIFICATION_Utils::shutDownBeep();
display_toggle(false);
displayToggle(false);
PMU.shutdown();
#else

View File

@ -275,7 +275,7 @@ namespace STATION_Utils {
#ifdef HAS_TFT
cleanTFT();
#endif
show_display("<<< TX >>>", "", packet,100);
displayShow("<<< TX >>>", "", packet,100);
LoRa_Utils::sendNewPacket(packet);
if (smartBeaconValue) {

View File

@ -98,7 +98,7 @@ namespace Utils {
void checkDisplayEcoMode() {
uint32_t lastDisplayTime = millis() - displayTime;
if (displayEcoMode && menuDisplay == 0 && millis() > 10 * 1000 && lastDisplayTime >= Config.display.timeout * 1000) {
display_toggle(false);
displayToggle(false);
displayState = false;
}
}

View File

@ -32,7 +32,7 @@ namespace WINLINK_Utils {
String number = String(winlinkInteger[i]);
int digit = number.toInt();
if (digit > Config.winlink.password.length()) {
show_display("__WINLINK_", "" , "PASS Length<REQUIRED", "", "" , "", 2000);
displayShow("__WINLINK_", "" , "PASS Length<REQUIRED", "", "" , "", 2000);
challengeAnswer += Config.winlink.password[0];
} else {
challengeAnswer += Config.winlink.password[digit - 1];
@ -50,7 +50,7 @@ namespace WINLINK_Utils {
void login() {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Start Login");
show_display("__WINLINK_", "" , "Login Initiation ...", "", "" , "<Back");
displayShow("__WINLINK_", "" , "Login Initiation ...", "", "" , "<Back");
if (winlinkStatus == 5) {
menuDisplay = 5000;
} else {