Skip to content

Commit

Permalink
Header Fix and BL for TFT fix
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed Dec 21, 2024
1 parent 4aaf5de commit 1d25119
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/LoRa_APRS_Tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
34 changes: 17 additions & 17 deletions src/keyboard_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/msg_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/winlink_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<REQUIRED", "", "" , "", 2000);
displayShow(" WINLINK", "" , "PASS Length<REQUIRED", "", "" , "", 2000);
challengeAnswer += Config.winlink.password[0];
} else {
challengeAnswer += Config.winlink.password[digit - 1];
Expand All @@ -50,7 +50,7 @@ namespace WINLINK_Utils {

void login() {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Start Login");
displayShow("__WINLINK_", "" , "Login Initiation ...", "", "" , "<Back");
displayShow(" WINLINK", "" , "Login Initiation ...", "", "" , "<Back");
if (winlinkStatus == 5) {
menuDisplay = 5000;
} else {
Expand Down

0 comments on commit 1d25119

Please sign in to comment.