Skip to content

Commit

Permalink
RFONLY update
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed Apr 4, 2024
1 parent c10645c commit e4bc8ee
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 5 additions & 1 deletion src/aprs_is_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/lora_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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();
}
Expand Down
6 changes: 5 additions & 1 deletion src/query_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/tnc_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ String inputServerBuffer[INPUT_BUFFER_SIZE];
String inputSerialBuffer = "";

namespace TNC_Utils {

void setup() {
if (Config.tnc.enableServer) {
tncServer.stop();
Expand Down

0 comments on commit e4bc8ee

Please sign in to comment.