From 05ccfe8ddd31b235245de2358008c340c6bd5a32 Mon Sep 17 00:00:00 2001 From: richonguzman Date: Wed, 14 Aug 2024 13:48:20 -0400 Subject: [PATCH] display code update --- src/LoRa_APRS_Tracker.cpp | 4 +- src/ble_utils.cpp | 2 +- src/bluetooth_utils.cpp | 4 +- src/bme_utils.cpp | 2 +- src/button_utils.cpp | 2 +- src/configuration.cpp | 2 +- src/display.cpp | 10 +- src/display.h | 8 +- src/gps_utils.cpp | 2 +- src/keyboard_utils.cpp | 60 +++++------ src/lora_utils.cpp | 2 +- src/menu_utils.cpp | 202 +++++++++++++++++++------------------- src/msg_utils.cpp | 22 ++--- src/power_utils.cpp | 2 +- src/station_utils.cpp | 2 +- src/utils.cpp | 2 +- src/winlink_utils.cpp | 4 +- 17 files changed, 166 insertions(+), 166 deletions(-) diff --git a/src/LoRa_APRS_Tracker.cpp b/src/LoRa_APRS_Tracker.cpp index c8e1dab..3fa22e7 100644 --- a/src/LoRa_APRS_Tracker.cpp +++ b/src/LoRa_APRS_Tracker.cpp @@ -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); diff --git a/src/ble_utils.cpp b/src/ble_utils.cpp index 400734c..84da1fd 100644 --- a/src/ble_utils.cpp +++ b/src/ble_utils.cpp @@ -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; diff --git a/src/bluetooth_utils.cpp b/src/bluetooth_utils.cpp index 000ac1b..734d8ac 100644 --- a/src/bluetooth_utils.cpp +++ b/src/bluetooth_utils.cpp @@ -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; } diff --git a/src/bme_utils.cpp b/src/bme_utils.cpp index 491606b..7a8b647 100644 --- a/src/bme_utils.cpp +++ b/src/bme_utils.cpp @@ -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) { diff --git a/src/button_utils.cpp b/src/button_utils.cpp index f56e641..5880082 100644 --- a/src/button_utils.cpp +++ b/src/button_utils.cpp @@ -20,7 +20,7 @@ namespace BUTTON_Utils { } void doublePress() { - display_toggle(true); + displayToggle(true); menuTime = millis(); if (menuDisplay == 0) { menuDisplay = 1; diff --git a/src/configuration.cpp b/src/configuration.cpp index 8d7e7f0..8782f99 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -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; diff --git a/src/display.cpp b/src/display.cpp index 4fefcd8..e1a7f01 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -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 diff --git a/src/display.h b/src/display.h index 7482a4d..cbf8061 100644 --- a/src/display.h +++ b/src/display.h @@ -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); diff --git a/src/gps_utils.cpp b/src/gps_utils.cpp index 757fcbe..9e96504 100644 --- a/src/gps_utils.cpp +++ b/src/gps_utils.cpp @@ -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); } } diff --git a/src/keyboard_utils.cpp b/src/keyboard_utils.cpp index 9e53fd5..6889df1 100644 --- a/src/keyboard_utils.cpp +++ b/src/keyboard_utils.cpp @@ -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; diff --git a/src/lora_utils.cpp b/src/lora_utils.cpp index 4d48fcc..459f2bd 100644 --- a/src/lora_utils.cpp +++ b/src/lora_utils.cpp @@ -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() { diff --git a/src/menu_utils.cpp b/src/menu_utils.cpp index 0cec0b8..c1dd55f 100644 --- a/src/menu_utils.cpp +++ b/src/menu_utils.cpp @@ -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), "", "", ""); + displayShow("WRITE_MSG>", "", "CALLSIGN = " + String(messageCallsign), "", "", ""); } 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, "", "", ""); + displayShow("WRITE_MSG>", "CALLSIGN -> " + messageCallsign, "MSG -> " + messageText, "", "", ""); } else { - show_display("WRITE_MSG>", "CALLSIGN -> " + messageCallsign, "MSG -> " + messageText, "", "", ""); + displayShow("WRITE_MSG>", "CALLSIGN -> " + messageCallsign, "MSG -> " + messageText, "", "", ""); } } else { - show_display("WRITE_MSG>", "--- MSG TO LONG! ---", " -> " + messageText, "", "", "", "--- MSG TO LONG! ---", " -> " + messageText, "", "", " 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, "", "", ""); + displayShow("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", ""); } else { - show_display("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", ""); + displayShow("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", ""); } } else { - show_display("WRITE_MSG>", "--- MSG TO LONG! ---", " -> " + messageText, "", "", "", "--- MSG TO LONG! ---", " -> " + messageText, "", "", " 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, "", "", ""); + displayShow("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", ""); } else { - show_display("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", ""); + displayShow("WRITE_MSG>", " - APRSThursday -", "MSG -> " + messageText, "", "", ""); } } else { - show_display("WRITE_MSG>", "--- MSG TO LONG! ---", " -> " + messageText, "", "", "", "--- MSG TO LONG! ---", " -> " + messageText, "", "", " 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?","","",""); + displayShow("_CALLSIGN_", ""," Confirm Change?","","",""); 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, "", ""); + displayShow("LORA__FREQ", ""," Confirm Change?", freqChangeWarning, "", ""); 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...","",""," Power Off if (keyDetected) { - show_display("POWER_OFF?", "","Confirm Power Off...","",""," Packet Decoder - show_display("STATIONS>", "", "> Packet Decoder", " Near By Stations", "", "", "", "> Packet Decoder", " Near By Stations", "", " Near By Stations - show_display("STATIONS>", "", " Packet Decoder", "> Near By Stations", "", "", "", " Packet Decoder", "> Near By 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), "", STATION_Utils::getNearTracker(0), STATION_Utils::getNearTracker(1), STATION_Utils::getNearTracker(2), STATION_Utils::getNearTracker(3), "", "> 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, "", "", ""); + displayShow("WLNK__READ", "", " READ MAIL N." + winlinkMailNumber, "", "", ""); 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 , "", "", ""); + displayShow("WLNK_REPLY", "", " REPLY MAIL N." + winlinkMailNumber , "", "", ""); 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 , "", "", ""); + displayShow("WLNK__FORW", "", " FORWARD MAIL N." + winlinkMailNumber , "", "", ""); break; case 5042: // WINLINK: Forward Mail // - show_display("WLNK_FORW_", " FORWARD MAIL N." + winlinkMailNumber , "To = " + winlinkAddressee, "", "", ""); + displayShow("WLNK_FORW_", " FORWARD MAIL N." + winlinkMailNumber , "To = " + winlinkAddressee, "", "", ""); 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, "", "", ""); + displayShow("WLNK___DEL", "", " DELETE MAIL N." + winlinkMailNumber, "", "", ""); 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, "", ""); + displayShow("WLNK_ALIAS", "", "Write Alias to Create", " -> " + winlinkAlias, "", ""); break; case 50611: // WINLINK: Alias Menu : Create Alias // - show_display("WLNK_ALIAS", "", " " + winlinkAlias + " =", winlinkAliasComplete, "", ""); + displayShow("WLNK_ALIAS", "", " " + winlinkAlias + " =", winlinkAliasComplete, "", ""); 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, "", ""); + displayShow("WLNK_ALIAS", "Write Alias to Delete", "", " -> " + winlinkAlias, "", ""); 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, "", ""); + displayShow("WLNK__MAIL", "--- Send Mail to ---", "", "-> " + winlinkAddressee, "", ""); break; case 5082: // WINLINK: WRITE MAIL: Subject // - show_display("WLNK__MAIL", "--- Write Subject ---", "", "-> " + winlinkSubject, "", ""); + displayShow("WLNK__MAIL", "--- Write Subject ---", "", "-> " + winlinkSubject, "", ""); break; case 5083: // WINLINK: WRITE MAIL: Body // if (winlinkBody.length() <= 67) { - show_display("WLNK__MAIL", "-- Body (lenght=" + String(winlinkBody.length()) + ")", "-> " + winlinkBody, "", "", ""); + displayShow("WLNK__MAIL", "-- Body (lenght=" + String(winlinkBody.length()) + ")", "-> " + winlinkBody, "", "", ""); } else { - show_display("WLNK__MAIL", "-- Body To Long = " + String(winlinkBody.length()) + "!", "-> " + winlinkBody, "", "", " " + winlinkBody, "", "", " 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, "", ""); + displayShow("_COMMENT_>", "Send this Comment in","the next GPS Beacon :", messageText, "", ""); } else { - show_display("_COMMENT_>", "Send this Comment in","the next GPS Beacon :", messageText, "", ""); + displayShow("_COMMENT_>", "Send this Comment in","the next GPS Beacon :", messageText, "", ""); } } else { - show_display("_COMMENT_>", " Comment is to long! ", " -> " + messageText, "", "", "", " Comment is to long! ", " -> " + messageText, "", "", ">", "", "", 500); + displayShow("<>", "", "", 500); } else if (station.indexOf("CA2RXU-15") == 0 && textMessage.indexOf("wrl") == 0) { - show_display("","", "--- Sending Query ---", 1000); + displayShow("","", "--- 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("", "From --> " + lastReceivedPacket.sender, place, summary, fifthLineWR, sixthLineWR); + displayShow("", "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("", "", lastReceivedPacket.message, 3000); + displayShow("", "", 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); } diff --git a/src/power_utils.cpp b/src/power_utils.cpp index 9f807ff..37d68cd 100644 --- a/src/power_utils.cpp +++ b/src/power_utils.cpp @@ -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 diff --git a/src/station_utils.cpp b/src/station_utils.cpp index 1103204..6ab6fc8 100644 --- a/src/station_utils.cpp +++ b/src/station_utils.cpp @@ -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) { diff --git a/src/utils.cpp b/src/utils.cpp index ea7e194..ad4cd78 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -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; } } diff --git a/src/winlink_utils.cpp b/src/winlink_utils.cpp index 704c750..a103a70 100644 --- a/src/winlink_utils.cpp +++ b/src/winlink_utils.cpp @@ -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 Start Login"); - show_display("__WINLINK_", "" , "Login Initiation ...", "", "" , "