digirepeater Colon fix
This commit is contained in:
parent
f1249b8e61
commit
1d62395d79
|
|
@ -269,7 +269,9 @@ namespace APRSPacketLib {
|
||||||
|
|
||||||
String generateDigiRepeatedPacket(const String& packet, const String &callsign, const String& path) {
|
String generateDigiRepeatedPacket(const String& packet, const String &callsign, const String& path) {
|
||||||
bool thirdParty = false;
|
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;
|
String temp;
|
||||||
if (thirdParty) { // only header is used
|
if (thirdParty) { // only header is used
|
||||||
|
|
|
||||||
|
|
@ -419,7 +419,7 @@ namespace MSG_Utils {
|
||||||
if (digirepeaterActive && lastReceivedPacket.addressee != currentBeacon->callsign) {
|
if (digirepeaterActive && lastReceivedPacket.addressee != currentBeacon->callsign) {
|
||||||
String digiRepeatedPacket = APRSPacketLib::generateDigiRepeatedPacket(packet.text, currentBeacon->callsign, Config.path);
|
String digiRepeatedPacket = APRSPacketLib::generateDigiRepeatedPacket(packet.text, currentBeacon->callsign, Config.path);
|
||||||
if (digiRepeatedPacket == "X") {
|
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 {
|
} else {
|
||||||
delay(500);
|
delay(500);
|
||||||
LoRa_Utils::sendNewPacket(digiRepeatedPacket);
|
LoRa_Utils::sendNewPacket(digiRepeatedPacket);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue