mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-11 16:03:58 +01:00
avoid 3 bytes again
This commit is contained in:
parent
7537c1ee50
commit
49cffe7d0c
|
|
@ -107,10 +107,14 @@ namespace APRS_IS_Utils {
|
|||
}
|
||||
|
||||
String buildPacketToUpload(const String& packet) {
|
||||
String payload = packet.substring(packet.indexOf(":"));
|
||||
if (payload.indexOf("\x3c\xff\x01") != -1) {
|
||||
payload = payload.substring(0, payload.indexOf("\x3c\xff\x01"));
|
||||
}
|
||||
if (!(Config.aprs_is.active && Config.digi.mode == 0)) { // Check if NOT only IGate
|
||||
return packet.substring(3, packet.indexOf(":")) + ",qAR," + Config.callsign + packet.substring(packet.indexOf(":"));
|
||||
return packet.substring(3, packet.indexOf(":")) + ",qAR," + Config.callsign + payload;
|
||||
} else {
|
||||
return packet.substring(3, packet.indexOf(":")) + ",qAO," + Config.callsign + packet.substring(packet.indexOf(":"));
|
||||
return packet.substring(3, packet.indexOf(":")) + ",qAO," + Config.callsign + payload;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -202,6 +206,9 @@ namespace APRS_IS_Utils {
|
|||
Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
|
||||
Addressee.trim();
|
||||
if (packet.indexOf("::") > 10 && Addressee == Config.callsign) { // its a message for me!
|
||||
if (AddresseeAndMessage.indexOf("\x3c\xff\x01") != -1) {
|
||||
AddresseeAndMessage = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf("\x3c\xff\x01"));
|
||||
}
|
||||
queryMessage = processReceivedLoRaMessage(Sender, AddresseeAndMessage);
|
||||
}
|
||||
if (!queryMessage) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,12 @@ namespace DIGI_Utils {
|
|||
repeatedPacket += temp0.substring(0, temp0.indexOf(",")); // tocall
|
||||
repeatedPacket += ",";
|
||||
repeatedPacket += path;
|
||||
repeatedPacket += packet.substring(packet.indexOf(":"));
|
||||
|
||||
String payload = packet.substring(packet.indexOf(":"));
|
||||
if (payload.indexOf("\x3c\xff\x01") != -1) {
|
||||
payload = payload.substring(0, payload.indexOf("\x3c\xff\x01"));
|
||||
}
|
||||
repeatedPacket += payload;
|
||||
return repeatedPacket;
|
||||
} else {
|
||||
return "";
|
||||
|
|
|
|||
Loading…
Reference in a new issue