digirepeater Colon fix

This commit is contained in:
richonguzman 2024-06-24 12:15:46 -04:00
parent f1249b8e61
commit 1d62395d79
2 changed files with 4 additions and 2 deletions

View File

@ -269,7 +269,9 @@ namespace APRSPacketLib {
String generateDigiRepeatedPacket(const String& packet, const String &callsign, const String& path) {
bool thirdParty = false;
if (packet.indexOf(":}") != -1) thirdParty = true;
int firstColonIndex = packet.indexOf(":");
if (firstColonIndex > 0 && firstColonIndex < packet.length() && packet[firstColonIndex + 1] == '}') thirdParty = true;
String temp;
if (thirdParty) { // only header is used

View File

@ -419,7 +419,7 @@ namespace MSG_Utils {
if (digirepeaterActive && lastReceivedPacket.addressee != currentBeacon->callsign) {
String digiRepeatedPacket = APRSPacketLib::generateDigiRepeatedPacket(packet.text, currentBeacon->callsign, Config.path);
if (digiRepeatedPacket == "X") {
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "Packet won't be Repeated (Missing WIDE1-X)");
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "Packet won't be Repeated (Missing WIDEn-N)");
} else {
delay(500);
LoRa_Utils::sendNewPacket(digiRepeatedPacket);