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++) { for (int i = sender.length(); i < 9; i++) {
sender += ' '; 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("{")); receivedMessage = packet.substring(packet.indexOf(":") + 1, packet.indexOf("{"));
} }
else { else {

View File

@ -97,9 +97,9 @@ namespace LoRa_Utils {
changeFreqTx(); changeFreqTx();
} }
#ifdef HAS_INTERNAL_LED #ifdef HAS_INTERNAL_LED
digitalWrite(internalLedPin, HIGH); digitalWrite(internalLedPin, HIGH);
#endif #endif
int state = radio.transmit("\x3c\xff\x01" + newPacket); int state = radio.transmit("\x3c\xff\x01" + newPacket);
if (state == RADIOLIB_ERR_NONE) { if (state == RADIOLIB_ERR_NONE) {
if (Config.syslog.active && WiFi.status() == WL_CONNECTED) { if (Config.syslog.active && WiFi.status() == WL_CONNECTED) {
@ -115,9 +115,9 @@ namespace LoRa_Utils {
Utils::print(F("failed, code ")); Utils::print(F("failed, code "));
Utils::println(String(state)); Utils::println(String(state));
} }
#ifdef HAS_INTERNAL_LED #ifdef HAS_INTERNAL_LED
digitalWrite(internalLedPin, LOW); digitalWrite(internalLedPin, LOW);
#endif #endif
if (Config.loramodule.txFreq != Config.loramodule.rxFreq) { if (Config.loramodule.txFreq != Config.loramodule.rxFreq) {
changeFreqRx(); changeFreqRx();
} }

View File

@ -41,7 +41,11 @@ namespace QUERY_Utils {
if (queryOrigin == "APRSIS") { if (queryOrigin == "APRSIS") {
return Config.callsign + ">APLRG1,TCPIP,qAC::" + station + ":" + answer;// + "\n"; return Config.callsign + ">APLRG1,TCPIP,qAC::" + station + ":" + answer;// + "\n";
} else { //} if (queryOrigin == "LoRa") { } 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 = ""; String inputSerialBuffer = "";
namespace TNC_Utils { namespace TNC_Utils {
void setup() { void setup() {
if (Config.tnc.enableServer) { if (Config.tnc.enableServer) {
tncServer.stop(); tncServer.stop();