From 1d2511944de5e509a317ca4243124ce39f671889 Mon Sep 17 00:00:00 2001 From: richonguzman Date: Sat, 21 Dec 2024 00:10:00 -0300 Subject: [PATCH] Header Fix and BL for TFT fix --- src/LoRa_APRS_Tracker.cpp | 2 +- src/display.cpp | 4 +++- src/keyboard_utils.cpp | 34 +++++++++++++++++----------------- src/msg_utils.cpp | 4 ++-- src/winlink_utils.cpp | 4 ++-- 5 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/LoRa_APRS_Tracker.cpp b/src/LoRa_APRS_Tracker.cpp index 6509b5f..2ce779a 100644 --- a/src/LoRa_APRS_Tracker.cpp +++ b/src/LoRa_APRS_Tracker.cpp @@ -57,7 +57,7 @@ TinyGPSPlus gps; BluetoothSerial SerialBT; #endif -String versionDate = "2024.12.19"; +String versionDate = "2024.12.21"; uint8_t myBeaconsIndex = 0; int myBeaconsSize = Config.beacons.size(); diff --git a/src/display.cpp b/src/display.cpp index 99cd053..501375a 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -318,7 +318,9 @@ void displaySetup() { } else { tft.setRotation(1); } - analogWrite(BOARD_BL_PIN, brightnessValues[tftBrightness]); + pinMode(TFT_BL, OUTPUT); + digitalWrite(TFT_BL, HIGH); + //analogWrite(BOARD_BL_PIN, brightnessValues[tftBrightness]); tft.setTextFont(0); tft.fillScreen(TFT_BLACK); #if defined(TTGO_T_DECK_PLUS) || defined(TTGO_T_DECK_GPS) diff --git a/src/keyboard_utils.cpp b/src/keyboard_utils.cpp index 79152f1..3bcb041 100644 --- a/src/keyboard_utils.cpp +++ b/src/keyboard_utils.cpp @@ -270,7 +270,7 @@ namespace KEYBOARD_Utils { statusState = true; statusTime = millis(); winlinkCommentState = false; - displayShow("__ INFO __", "", " CHANGING CALLSIGN!", "", "-----> " + Config.beacons[myBeaconsIndex].callsign, "", 2000); + displayShow(" INFO", "", " CHANGING CALLSIGN!", "", "-----> " + Config.beacons[myBeaconsIndex].callsign, "", 2000); STATION_Utils::saveIndex(0, myBeaconsIndex); sendStartTelemetry = true; if (menuDisplay == 200) menuDisplay = 20; @@ -321,25 +321,25 @@ namespace KEYBOARD_Utils { } else if (menuDisplay == 220) { if (!displayEcoMode) { displayEcoMode = true; - displayShow("_DISPLAY__", "", " ECO MODE -> ON", 1000); + displayShow(" DISPLAY", "", " ECO MODE -> ON", 1000); } else { displayEcoMode = false; - displayShow("_DISPLAY__", "", " ECO MODE -> OFF", 1000); + displayShow(" DISPLAY", "", " ECO MODE -> OFF", 1000); } } else if (menuDisplay == 221) { if (screenBrightness ==1) { - displayShow("_SCREEN___", "", "SCREEN BRIGHTNESS MAX", 1000); + displayShow(" SCREEN", "", "SCREEN BRIGHTNESS MAX", 1000); screenBrightness = 255; } else { - displayShow("_SCREEN___", "", "SCREEN BRIGHTNESS MIN", 1000); + displayShow(" SCREEN", "", "SCREEN BRIGHTNESS MIN", 1000); screenBrightness = 1; } } else if (menuDisplay == 240) { - displayShow("_STATUS___", "", "WRITE STATUS","STILL IN DEVELOPMENT!", "", "", 2000); ///////////////////////// + displayShow(" STATUS", "", "WRITE STATUS","STILL IN DEVELOPMENT!", "", "", 2000); ///////////////////////// } else if (menuDisplay == 241) { - displayShow("_STATUS___", "", "SELECT STATUS","STILL IN DEVELOPMENT!", "", "", 2000); ///////////////////////// + displayShow(" STATUS", "", "SELECT STATUS","STILL IN DEVELOPMENT!", "", "", 2000); ///////////////////////// } else if (menuDisplay == 250) { - displayShow("_NOTIFIC__", "", "NOTIFICATIONS","STILL IN DEVELOPMENT!", "", "", 2000); ///////////////////////// + displayShow(" NOTIFIC", "", "NOTIFICATIONS","STILL IN DEVELOPMENT!", "", "", 2000); ///////////////////////// } else if (menuDisplay == 4) { @@ -368,10 +368,10 @@ namespace KEYBOARD_Utils { } else if (menuDisplay == 53) { if (winlinkCommentState) { winlinkCommentState = false; - displayShow("_WINLINK_>", "", " WLNK COMMENTs OFF!", 2000); + displayShow(" WINLINK>", "", " WLNK COMMENTs OFF!", 2000); } else { winlinkCommentState = true; - displayShow("_WINLINK_>", "", " WLNK COMMENTs ON!", 2000); + displayShow(" WINLINK>", "", " WLNK COMMENTs ON!", 2000); } } else if (menuDisplay == 5000) { MSG_Utils::addToOutputBuffer(1, "WLNK-1", "L"); @@ -438,32 +438,32 @@ namespace KEYBOARD_Utils { } else if (menuDisplay == 60) { if (Config.notification.ledFlashlight) { if (flashlight) { - displayShow("__EXTRAS__", ""," Flashlight"," Status --> OFF", "", "", 2000); + displayShow(" EXTRAS", ""," Flashlight"," Status --> OFF", "", "", 2000); flashlight = false; } else { - displayShow("__EXTRAS__", ""," Flashlight"," Status --> ON", "", "", 2000); + displayShow(" EXTRAS", ""," Flashlight"," Status --> ON", "", "", 2000); flashlight = true; } } else { - displayShow("__EXTRAS__", ""," Flashlight","NOT ACTIVE IN CONFIG!", "", "", 2000); + displayShow(" EXTRAS", ""," Flashlight","NOT ACTIVE IN CONFIG!", "", "", 2000); } } else if (menuDisplay == 61) { if (digipeaterActive) { - displayShow("__EXTRAS__", ""," Digipeater"," Status --> OFF", "", "", 2000); + displayShow(" EXTRAS", ""," Digipeater"," Status --> OFF", "", "", 2000); logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "Digipeater OFF"); digipeaterActive = false; } else { - displayShow("__EXTRAS__", ""," Digipeater"," Status --> ON","", "", 2000); + displayShow(" EXTRAS", ""," Digipeater"," Status --> ON","", "", 2000); logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "Digipeater ON"); digipeaterActive = true; } } else if (menuDisplay == 62) { if (sosActive) { - displayShow("__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 { - displayShow("__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; } diff --git a/src/msg_utils.cpp b/src/msg_utils.cpp index b184387..39c7f51 100644 --- a/src/msg_utils.cpp +++ b/src/msg_utils.cpp @@ -504,13 +504,13 @@ namespace MSG_Utils { logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Login Succesfull"); lastMsgRxTime = millis(); winlinkStatus = 5; - displayShow("_WINLINK_>", "", " LOGGED !!!!", 2000); + displayShow(" WINLINK>", "", " LOGGED !!!!", 2000); cleanOutputAckRequestBuffer("WLNK-1"); menuDisplay = 5000; } else if (winlinkStatus == 5 && lastReceivedPacket.payload.indexOf("Log off successful") == 0 ) { logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Log Out"); lastMsgRxTime = millis(); - displayShow("_WINLINK_>", "", " LOG OUT !!!", 2000); + displayShow(" WINLINK>", "", " LOG OUT !!!", 2000); cleanOutputAckRequestBuffer("WLNK-1"); lastChallengeTime = 0; winlinkStatus = 0; diff --git a/src/winlink_utils.cpp b/src/winlink_utils.cpp index a103a70..94c2760 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()) { - displayShow("__WINLINK_", "" , "PASS Length Start Login"); - displayShow("__WINLINK_", "" , "Login Initiation ...", "", "" , "