Skip to content

Commit

Permalink
update display toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed Apr 29, 2024
1 parent e182dd1 commit 708742f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/aprs_is_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace APRS_IS_Utils {
wifiState = "OK";
} else {
wifiState = "AP";
if (!Config.display.alwaysOn) {
if (!Config.display.alwaysOn && Config.display.timeout != 0) {
display_toggle(true);
}
lastScreenOn = millis();
Expand All @@ -92,7 +92,7 @@ namespace APRS_IS_Utils {
aprsisState = "--";
}
#endif
if(aprsisState == "--" && !Config.display.alwaysOn) {
if(aprsisState == "--" && !Config.display.alwaysOn && Config.display.timeout != 0) {
display_toggle(true);
lastScreenOn = millis();
}
Expand Down Expand Up @@ -138,7 +138,7 @@ namespace APRS_IS_Utils {
}
if (receivedMessage.indexOf("?") == 0) {
delay(2000);
if (!Config.display.alwaysOn) {
if (!Config.display.alwaysOn && Config.display.timeout != 0) {
display_toggle(true);
}
STATION_Utils::addToOutputPacketBuffer(QUERY_Utils::process(receivedMessage, sender, "LoRa"));
Expand Down Expand Up @@ -170,7 +170,7 @@ namespace APRS_IS_Utils {
}
if (!queryMessage) {
aprsPacket = buildPacketToUpload(packet);
if (!Config.display.alwaysOn) {
if (!Config.display.alwaysOn && Config.display.timeout != 0) {
display_toggle(true);
}
lastScreenOn = millis();
Expand Down Expand Up @@ -222,7 +222,7 @@ namespace APRS_IS_Utils {
Utils::println("Received Query APRS-IS : " + packet);
String queryAnswer = QUERY_Utils::process(receivedMessage, Sender, "APRSIS");
//Serial.println("---> QUERY Answer : " + queryAnswer.substring(0,queryAnswer.indexOf("\n")));
if (!Config.display.alwaysOn) {
if (!Config.display.alwaysOn && Config.display.timeout != 0) {
display_toggle(true);
}
lastScreenOn = millis();
Expand Down
5 changes: 3 additions & 2 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ namespace Utils {
}

if (beaconUpdate) {
display_toggle(true);

if (!Config.display.alwaysOn && Config.display.timeout != 0) {
display_toggle(true);
}
Utils::println("-- Sending Beacon to APRSIS --");

STATION_Utils::deleteNotHeard();
Expand Down

0 comments on commit 708742f

Please sign in to comment.