digi mode 3 added
This commit is contained in:
parent
1888084f31
commit
1afd039c3f
|
|
@ -38,7 +38,7 @@ ________________________________________________________________________________
|
||||||
#include "A7670_utils.h"
|
#include "A7670_utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
String versionDate = "2024.08.02";
|
String versionDate = "2024.08.03";
|
||||||
Configuration Config;
|
Configuration Config;
|
||||||
WiFiClient espClient;
|
WiFiClient espClient;
|
||||||
|
|
||||||
|
|
@ -163,7 +163,7 @@ void loop() {
|
||||||
APRS_IS_Utils::processLoRaPacket(packet); // Send received packet to APRSIS
|
APRS_IS_Utils::processLoRaPacket(packet); // Send received packet to APRSIS
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.digi.mode == 2 || backUpDigiMode) { // If Digi enabled
|
if (Config.digi.mode == 2 || Config.digi.mode == 3 || backUpDigiMode) { // If Digi enabled
|
||||||
STATION_Utils::clean25SegBuffer();
|
STATION_Utils::clean25SegBuffer();
|
||||||
DIGI_Utils::processLoRaPacket(packet); // Send received packet to Digi
|
DIGI_Utils::processLoRaPacket(packet); // Send received packet to Digi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,11 @@ namespace DIGI_Utils {
|
||||||
String buildPacket(const String& path, const String& packet, bool thirdParty) {
|
String buildPacket(const String& path, const String& packet, bool thirdParty) {
|
||||||
String packetToRepeat = packet.substring(0, packet.indexOf(",") + 1);
|
String packetToRepeat = packet.substring(0, packet.indexOf(",") + 1);
|
||||||
String tempPath = path;
|
String tempPath = path;
|
||||||
tempPath.replace(Config.beacon.path, Config.callsign + "*");
|
if (Config.digi.mode == 2) {
|
||||||
|
tempPath.replace("WIDE1-1", Config.callsign + "*");
|
||||||
|
} else if (Config.digi.mode == 3) {
|
||||||
|
tempPath.replace("WIDE2-1", Config.callsign + "*");
|
||||||
|
}
|
||||||
packetToRepeat += tempPath;
|
packetToRepeat += tempPath;
|
||||||
if (thirdParty) {
|
if (thirdParty) {
|
||||||
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(packet.indexOf(":}")));
|
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(packet.indexOf(":}")));
|
||||||
|
|
@ -47,7 +51,7 @@ namespace DIGI_Utils {
|
||||||
}
|
}
|
||||||
if (temp.indexOf(",") > 2) { // checks for path
|
if (temp.indexOf(",") > 2) { // checks for path
|
||||||
const String& path = temp.substring(temp.indexOf(",") + 1); // after tocall
|
const String& path = temp.substring(temp.indexOf(",") + 1); // after tocall
|
||||||
if (path.indexOf(Config.beacon.path) != -1) {
|
if ((Config.digi.mode == 2 && path.indexOf("WIDE1-1") != - 1) || (Config.digi.mode == 3 && path.indexOf("WIDE2-1") != -1)) {
|
||||||
return buildPacket(path, packet, thirdParty);
|
return buildPacket(path, packet, thirdParty);
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue