mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-01-21 16:20:15 +01:00
digi packet process fix
This commit is contained in:
parent
eb472b1506
commit
7e4fdff0a3
|
|
@ -24,7 +24,7 @@
|
|||
Configuration Config;
|
||||
WiFiClient espClient;
|
||||
|
||||
String versionDate = "2024.04.22";
|
||||
String versionDate = "2024.04.23";
|
||||
uint8_t myWiFiAPIndex = 0;
|
||||
int myWiFiAPSize = Config.wifiAPs.size();
|
||||
WiFi_AP *currentWiFi = &Config.wifiAPs[myWiFiAPIndex];
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ extern std::vector<String> outputPacketBuffer;
|
|||
|
||||
namespace DIGI_Utils {
|
||||
|
||||
String generateDigiRepeatedPacket(String packet, String callsign) {
|
||||
String generateDigiRepeatedPacket(String packet){
|
||||
String sender, temp0, tocall, path;
|
||||
sender = packet.substring(0, packet.indexOf(">"));
|
||||
temp0 = packet.substring(packet.indexOf(">") + 1, packet.indexOf(":"));
|
||||
|
|
@ -36,10 +36,10 @@ namespace DIGI_Utils {
|
|||
String hop = path.substring(path.indexOf("WIDE1-") + 6, path.indexOf("WIDE1-") + 7);
|
||||
if (hop.toInt() >= 1 && hop.toInt() <= 7) {
|
||||
if (hop.toInt() == 1) {
|
||||
path.replace("WIDE1-1", callsign + "*");
|
||||
path.replace("WIDE1-1", Config.callsign + "*");
|
||||
}
|
||||
else {
|
||||
path.replace("WIDE1-" + hop, callsign + "*,WIDE1-" + String(hop.toInt() - 1));
|
||||
path.replace("WIDE1-" + hop, Config.callsign + "*,WIDE1-" + String(hop.toInt() - 1));
|
||||
}
|
||||
String repeatedPacket = sender + ">" + tocall + "," + path + packet.substring(packet.indexOf(":"));
|
||||
return repeatedPacket;
|
||||
|
|
@ -73,7 +73,7 @@ namespace DIGI_Utils {
|
|||
queryMessage = APRS_IS_Utils::processReceivedLoRaMessage(Sender, AddresseeAndMessage);
|
||||
}
|
||||
if (!queryMessage && packet.indexOf("WIDE1-") > 10 && Config.digi.mode == 2) { // If should repeat packet (WIDE1 Digi)
|
||||
loraPacket = generateDigiRepeatedPacket(packet.substring(3), Config.callsign);
|
||||
loraPacket = generateDigiRepeatedPacket(packet.substring(3));
|
||||
if (loraPacket != "") {
|
||||
STATION_Utils::addToOutputPacketBuffer(loraPacket);
|
||||
display_toggle(true);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
namespace DIGI_Utils {
|
||||
|
||||
String generateDigiRepeatedPacket(String packet, String callsign);
|
||||
String generateDigiRepeatedPacket(String packet);
|
||||
void processLoRaPacket(String packet);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,9 +82,22 @@
|
|||
#define RADIO_BUSY_PIN 4 // SX1262 BUSY
|
||||
#endif
|
||||
|
||||
#ifdef ESP32_DIY_LoRa_A7670
|
||||
#define RADIO_SCLK_PIN 18
|
||||
#define RADIO_MISO_PIN 19
|
||||
#define RADIO_MOSI_PIN 23
|
||||
#define RADIO_CS_PIN 2
|
||||
#define RADIO_RST_PIN 0
|
||||
#define RADIO_BUSY_PIN 32
|
||||
#define A7670_PWR_PIN 4
|
||||
#define A7670_ResetPin 5
|
||||
#define A7670_TX_PIN 26
|
||||
#define A7670_RX_PIN 27
|
||||
#endif
|
||||
|
||||
|
||||
// OLED
|
||||
#if defined(TTGO_T_LORA32_V2_1) || defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_1W_LoRa) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(OE5HWN_MeshCom)
|
||||
#if defined(TTGO_T_LORA32_V2_1) || defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_1W_LoRa) || defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_0_SX1268) || defined(TTGO_T_Beam_V1_2_SX1262) || defined(OE5HWN_MeshCom) || defined(ESP32_DIY_LoRa_A7670)
|
||||
#define OLED_SDA 21
|
||||
#define OLED_SCL 22
|
||||
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
|
||||
|
|
@ -139,8 +152,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef ESP32_C3_DIY_LoRa
|
||||
#define OLED_SDA 8
|
||||
#define OLED_SCL 9
|
||||
|
|
|
|||
Loading…
Reference in a new issue