diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index 8c17303..ad4a4c4 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -38,7 +38,7 @@ ________________________________________________________________________________ #include "A7670_utils.h" #endif -String versionDate = "2024.08.12"; +String versionDate = "2024.08.13"; Configuration Config; WiFiClient espClient; @@ -98,7 +98,7 @@ void setup() { String comment = Config.beacon.comment; if (Config.battery.sendInternalVoltage) comment += " Batt=" + String(BATTERY_Utils::checkInternalVoltage(),2) + "V"; if (Config.battery.sendExternalVoltage) comment += " Ext=" + String(BATTERY_Utils::checkExternalVoltage(),2) + "V"; - STATION_Utils::addToOutputPacketBuffer(GPS_Utils::getiGateLoRaBeaconPacket() + comment); + LoRa_Utils::sendNewPacket(GPS_Utils::getiGateLoRaBeaconPacket() + comment); lastBeacon = time; } diff --git a/src/digi_utils.cpp b/src/digi_utils.cpp index 358394e..c09b2d8 100644 --- a/src/digi_utils.cpp +++ b/src/digi_utils.cpp @@ -5,6 +5,7 @@ #include "query_utils.h" #include "digi_utils.h" #include "wifi_utils.h" +#include "lora_utils.h" #include "gps_utils.h" #include "display.h" #include "utils.h" @@ -102,7 +103,7 @@ namespace DIGI_Utils { if (!thirdPartyPacket && !Utils::checkValidCallsign(Sender)) { return; } - if (STATION_Utils::check25SegBuffer(Sender, temp.substring(temp.indexOf(":") + 2))) { + if (STATION_Utils::check25SegBuffer(Sender, temp.substring(temp.indexOf(":") + 2)) || Config.lowPowerMode) { STATION_Utils::updateLastHeard(Sender); Utils::typeOfPacket(temp, 2); // Digi bool queryMessage = false; @@ -117,7 +118,11 @@ namespace DIGI_Utils { if (!queryMessage) { String loraPacket = generateDigiRepeatedPacket(packet.substring(3), thirdPartyPacket); if (loraPacket != "") { - STATION_Utils::addToOutputPacketBuffer(loraPacket); + if (Config.lowPowerMode) { + LoRa_Utils::sendNewPacket(loraPacket); + } else { + STATION_Utils::addToOutputPacketBuffer(loraPacket); + } display_toggle(true); lastScreenOn = millis(); } diff --git a/src/lora_utils.cpp b/src/lora_utils.cpp index a5fdfe1..dec6e94 100644 --- a/src/lora_utils.cpp +++ b/src/lora_utils.cpp @@ -160,9 +160,9 @@ namespace LoRa_Utils { String receivePacket() { String packet = ""; - if (operationDone) { + if (operationDone || Config.lowPowerMode) { operationDone = false; - if (transmitFlag) { + if (transmitFlag && !Config.lowPowerMode) { radio.startReceive(); transmitFlag = false; } else {