RFONLY update

This commit is contained in:
richonguzman 2024-04-04 15:54:49 -03:00
parent c10645c2c0
commit e4bc8eecbe
4 changed files with 15 additions and 6 deletions

View file

@ -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 {

View file

@ -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();
}

View file

@ -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;
}
}
}

View file

@ -20,6 +20,7 @@ String inputServerBuffer[INPUT_BUFFER_SIZE];
String inputSerialBuffer = "";
namespace TNC_Utils {
void setup() {
if (Config.tnc.enableServer) {
tncServer.stop();