From 708742f43dd6410a97de11fb7be3c0bbf450d5bb Mon Sep 17 00:00:00 2001 From: richonguzman Date: Mon, 29 Apr 2024 09:19:25 -0400 Subject: [PATCH] update display toggle --- src/aprs_is_utils.cpp | 10 +++++----- src/utils.cpp | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/aprs_is_utils.cpp b/src/aprs_is_utils.cpp index 4cee1ed4..db4b845f 100644 --- a/src/aprs_is_utils.cpp +++ b/src/aprs_is_utils.cpp @@ -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(); @@ -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(); } @@ -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")); @@ -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(); @@ -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(); diff --git a/src/utils.cpp b/src/utils.cpp index e740c54a..e6b9ec87 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -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();