diff --git a/src/aprs_is_utils.cpp b/src/aprs_is_utils.cpp index b8ca0222..081ec725 100644 --- a/src/aprs_is_utils.cpp +++ b/src/aprs_is_utils.cpp @@ -108,7 +108,11 @@ namespace APRS_IS_Utils { for (int i = sender.length(); i < 9; i++) { sender += ' '; } - LoRa_Utils::sendNewPacket("APRS", Config.callsign + ">APLRG1," + Config.beacon.path + "::" + sender + ":" + ackMessage); + if (Config.beacon.path == "") { + LoRa_Utils::sendNewPacket("APRS", Config.callsign + ">APLRG1,RFONLY::" + sender + ":" + ackMessage); + } else { + LoRa_Utils::sendNewPacket("APRS", Config.callsign + ">APLRG1,RFONLY" + Config.beacon.path + "::" + sender + ":" + ackMessage); + } receivedMessage = packet.substring(packet.indexOf(":") + 1, packet.indexOf("{")); } else { diff --git a/src/lora_utils.cpp b/src/lora_utils.cpp index 16bd1d80..c30303d5 100644 --- a/src/lora_utils.cpp +++ b/src/lora_utils.cpp @@ -97,9 +97,9 @@ namespace LoRa_Utils { changeFreqTx(); } -#ifdef HAS_INTERNAL_LED + #ifdef HAS_INTERNAL_LED digitalWrite(internalLedPin, HIGH); -#endif + #endif int state = radio.transmit("\x3c\xff\x01" + newPacket); if (state == RADIOLIB_ERR_NONE) { if (Config.syslog.active && WiFi.status() == WL_CONNECTED) { @@ -115,9 +115,9 @@ namespace LoRa_Utils { Utils::print(F("failed, code ")); Utils::println(String(state)); } -#ifdef HAS_INTERNAL_LED + #ifdef HAS_INTERNAL_LED digitalWrite(internalLedPin, LOW); -#endif + #endif if (Config.loramodule.txFreq != Config.loramodule.rxFreq) { changeFreqRx(); } diff --git a/src/query_utils.cpp b/src/query_utils.cpp index 9b08cbf2..334c72b8 100644 --- a/src/query_utils.cpp +++ b/src/query_utils.cpp @@ -41,7 +41,11 @@ namespace QUERY_Utils { if (queryOrigin == "APRSIS") { return Config.callsign + ">APLRG1,TCPIP,qAC::" + station + ":" + answer;// + "\n"; } else { //} if (queryOrigin == "LoRa") { - return Config.callsign + ">APLRG1," + Config.beacon.path + "::" + station + ":" + answer; + if (Config.beacon.path == "") { + return Config.callsign + ">APLRG1,RFONLY::" + station + ":" + answer; + } else { + return Config.callsign + ">APLRG1,RFONLY," + Config.beacon.path + "::" + station + ":" + answer; + } } } diff --git a/src/tnc_utils.cpp b/src/tnc_utils.cpp index e1b6b589..657da9b7 100644 --- a/src/tnc_utils.cpp +++ b/src/tnc_utils.cpp @@ -20,6 +20,7 @@ String inputServerBuffer[INPUT_BUFFER_SIZE]; String inputSerialBuffer = ""; namespace TNC_Utils { + void setup() { if (Config.tnc.enableServer) { tncServer.stop();