From cda72194db20f7a84b98ab464fdf92f14d1ff304 Mon Sep 17 00:00:00 2001 From: richonguzman Date: Tue, 23 Apr 2024 13:57:21 -0400 Subject: [PATCH] Add ESP32 & Modem A7670 --- platformio.ini | 4 +--- src/LoRa_APRS_iGate.cpp | 2 -- src/aprs_is_utils.cpp | 2 +- src/utils.cpp | 5 +++++ 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/platformio.ini b/platformio.ini index 0e01f8d2..508bfb53 100644 --- a/platformio.ini +++ b/platformio.ini @@ -206,6 +206,4 @@ build_flags = lib_deps = ${common.lib_deps} vshymanskyy/TinyGSM@^0.11.7 - vshymanskyy/StreamDebugger@^1.0.1 - ;https://github.com/ricemices/ArduinoHttpClient - ;plerup/EspSoftwareSerial@^8.2.0 \ No newline at end of file + vshymanskyy/StreamDebugger@^1.0.1 \ No newline at end of file diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index 368c9064..31689e6b 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -218,14 +218,12 @@ void loop() { DIGI_Utils::processLoRaPacket(packet); // Send received packet to Digi } - #ifndef ESP32_DIY_LoRa_A7670 if (Config.tnc.enableServer) { // If TNC server enabled TNC_Utils::sendToClients(packet); // Send received packet to TNC KISS } if (Config.tnc.enableSerial) { // If Serial KISS enabled TNC_Utils::sendToSerial(packet); // Send received packet to Serial KISS } - #endif } if (Config.aprs_is.active) { // If APRSIS enabled diff --git a/src/aprs_is_utils.cpp b/src/aprs_is_utils.cpp index 57cc3e66..73d1f338 100644 --- a/src/aprs_is_utils.cpp +++ b/src/aprs_is_utils.cpp @@ -151,7 +151,7 @@ namespace APRS_IS_Utils { } void processLoRaPacket(String packet) { - if (espClient.connected()) { + if (espClient.connected() || modemLoggedToAPRSIS) { bool queryMessage = false; String aprsPacket, Sender, AddresseeAndMessage, Addressee; if (packet != "") { diff --git a/src/utils.cpp b/src/utils.cpp index 06ae583d..ba112b7e 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -5,6 +5,7 @@ #include "aprs_is_utils.h" #include "syslog_utils.h" #include "pins_config.h" +#include "A7670_utils.h" #include "wifi_utils.h" #include "gps_utils.h" #include "bme_utils.h" @@ -130,7 +131,11 @@ namespace Utils { if (Config.aprs_is.active && Config.beacon.sendViaAPRSIS) { show_display(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING IGATE BEACON", 0); seventhLine = " listening..."; + #ifdef ESP32_DIY_LoRa_A7670 + A7670_Utils::uploadToAPRSIS(beaconPacket); + #else APRS_IS_Utils::upload(beaconPacket); + #endif } if (Config.beacon.sendViaRF) {