mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-07-14 13:51:09 +02:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e31dbbf91f | |||
| 11c36a91fb | |||
| a97ffe709f | |||
| c80b565730 | |||
| 84cbcc30e8 | |||
| 11d413cb17 | |||
| 19d767e3cb | |||
| 803bde1008 | |||
| 8ab1f5ec24 | |||
| cfc9474469 | |||
| 949807bc14 | |||
| 35760b74f7 | |||
| b5690a2f37 | |||
| b448e2fc6b | |||
| c33720a5fb | |||
| e57fad6666 | |||
| 2418291ac9 | |||
| 796ba35357 | |||
| 57873e4181 | |||
| 453222d69f | |||
| fbb347fb7f | |||
| 50fd831fdb | |||
| 3a2c0304d0 | |||
| b24c2b2527 |
@@ -19,6 +19,8 @@ jobs:
|
|||||||
chip: esp32s3
|
chip: esp32s3
|
||||||
- name: heltec-lora32-v2
|
- name: heltec-lora32-v2
|
||||||
chip: esp32
|
chip: esp32
|
||||||
|
- name: heltec-lora32-v2_915
|
||||||
|
chip: esp32
|
||||||
- name: heltec_wifi_lora_32_V3
|
- name: heltec_wifi_lora_32_V3
|
||||||
chip: esp32s3
|
chip: esp32s3
|
||||||
- name: heltec_wifi_lora_32_V3_2
|
- name: heltec_wifi_lora_32_V3_2
|
||||||
@@ -96,7 +98,9 @@ jobs:
|
|||||||
- name: XIAO_ESP32S3_WIO_SX1262
|
- name: XIAO_ESP32S3_WIO_SX1262
|
||||||
chip: esp32s3
|
chip: esp32s3
|
||||||
- name: TROY_LoRa_APRS
|
- name: TROY_LoRa_APRS
|
||||||
chip: esp32
|
chip: esp32
|
||||||
|
- name: ESP32_9M2IBR_1W_LoRa_GPS
|
||||||
|
chip: esp32
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ ____________________________________________________
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
# Timeline (Versions):
|
# Timeline (Versions):
|
||||||
|
- 2026-02-26 9M2IBR ESP32 1W (400M30S) + GPS board added.
|
||||||
- 2026-02-25 Code Improvements: reduced String comparisons and improved logic for faster code execution.
|
- 2026-02-25 Code Improvements: reduced String comparisons and improved logic for faster code execution.
|
||||||
- 2026-02-15 Digipeater code/logic improved.
|
- 2026-02-15 Digipeater code/logic improved.
|
||||||
- 2026-02-08 Heltec V2 915MHz added.
|
- 2026-02-08 Heltec V2 915MHz added.
|
||||||
|
|||||||
+9
-9
@@ -23,20 +23,20 @@ build_flags =
|
|||||||
-D RADIOLIB_EXCLUDE_SSTV=1
|
-D RADIOLIB_EXCLUDE_SSTV=1
|
||||||
-I variants/${PIOENV}
|
-I variants/${PIOENV}
|
||||||
lib_deps =
|
lib_deps =
|
||||||
adafruit/Adafruit Unified Sensor @ 1.1.14
|
adafruit/Adafruit Unified Sensor @ 1.1.15
|
||||||
adafruit/Adafruit AHTX0 @ 2.0.5
|
adafruit/Adafruit AHTX0 @ 2.0.6
|
||||||
adafruit/Adafruit BME280 Library @ 2.2.4
|
adafruit/Adafruit BME280 Library @ 2.3.0
|
||||||
adafruit/Adafruit BMP280 Library @ 2.6.8
|
adafruit/Adafruit BMP280 Library @ 3.0.0
|
||||||
adafruit/Adafruit BME680 Library @ 2.0.4
|
adafruit/Adafruit BME680 Library @ 2.0.6
|
||||||
adafruit/Adafruit INA219 @ 1.2.3
|
adafruit/Adafruit INA219 @ 1.2.3
|
||||||
adafruit/Adafruit Si7021 Library @ 1.5.3
|
adafruit/Adafruit Si7021 Library @ 1.5.3
|
||||||
arduino-libraries/NTPClient @ 3.2.1
|
arduino-libraries/NTPClient @ 3.2.1
|
||||||
ayushsharma82/ElegantOTA @ 3.1.7
|
ayushsharma82/ElegantOTA @ 3.1.7
|
||||||
bblanchon/ArduinoJson @ 6.21.3
|
bblanchon/ArduinoJson @ 6.21.3
|
||||||
jgromes/RadioLib @ 7.1.0
|
jgromes/RadioLib @ 7.6.0
|
||||||
knolleary/PubSubClient @ 2.8
|
knolleary/PubSubClient @ 2.8
|
||||||
ESP32Async/AsyncTCP @ 3.4.9
|
ESP32Async/AsyncTCP @ 3.4.10
|
||||||
ESP32Async/ESPAsyncWebServer @ 3.9.3
|
ESP32Async/ESPAsyncWebServer @ 3.10.0
|
||||||
mikalhart/TinyGPSPlus @ 1.0.3
|
mikalhart/TinyGPSPlus @ 1.0.3
|
||||||
richonguzman/APRSPacketLib @ 1.0.4
|
richonguzman/APRSPacketLib @ 1.0.4
|
||||||
display_libs =
|
display_libs =
|
||||||
@@ -44,4 +44,4 @@ display_libs =
|
|||||||
adafruit/Adafruit SSD1306 @ 2.5.10
|
adafruit/Adafruit SSD1306 @ 2.5.10
|
||||||
usb_flags=
|
usb_flags=
|
||||||
-DARDUINO_USB_MODE=1
|
-DARDUINO_USB_MODE=1
|
||||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||||
@@ -195,13 +195,13 @@ public:
|
|||||||
REMOTE_MANAGEMENT remoteManagement;
|
REMOTE_MANAGEMENT remoteManagement;
|
||||||
MQTT mqtt;
|
MQTT mqtt;
|
||||||
|
|
||||||
|
void setup();
|
||||||
void setDefaultValues();
|
void setDefaultValues();
|
||||||
bool writeFile();
|
bool writeFile();
|
||||||
Configuration();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool readFile();
|
bool readFile();
|
||||||
String _filePath;
|
String _filePath;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace POWER_Utils {
|
|||||||
void vext_ctrl_OFF();
|
void vext_ctrl_OFF();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ADC_CTRL
|
#ifdef ADC_CTRL_PIN
|
||||||
void adc_ctrl_ON();
|
void adc_ctrl_ON();
|
||||||
void adc_ctrl_OFF();
|
void adc_ctrl_OFF();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ extra_configs =
|
|||||||
variants/*/platformio.ini
|
variants/*/platformio.ini
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
platform = espressif32 @ 6.7.0
|
platform = espressif32 @ 6.12.0
|
||||||
board_build.partitions = min_spiffs.csv
|
board_build.partitions = min_spiffs.csv
|
||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ ___________________________________________________________________*/
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
String versionDate = "2026-02-25";
|
String versionDate = "2026-03-08";
|
||||||
String versionNumber = "3.2";
|
String versionNumber = "3.2.103";
|
||||||
Configuration Config;
|
Configuration Config;
|
||||||
WiFiClient aprsIsClient;
|
WiFiClient aprsIsClient;
|
||||||
WiFiClient mqttClient;
|
WiFiClient mqttClient;
|
||||||
@@ -101,6 +101,7 @@ String firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seven
|
|||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
|
Config.setup();
|
||||||
POWER_Utils::setup();
|
POWER_Utils::setup();
|
||||||
Utils::setupDisplay();
|
Utils::setupDisplay();
|
||||||
LoRa_Utils::setup();
|
LoRa_Utils::setup();
|
||||||
@@ -216,4 +217,4 @@ void loop() {
|
|||||||
Utils::checkRebootTime();
|
Utils::checkRebootTime();
|
||||||
Utils::checkSleepByLowBatteryVoltage(1);
|
Utils::checkSleepByLowBatteryVoltage(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ namespace BATTERY_Utils {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef ADC_CTRL
|
#ifdef ADC_CTRL_PIN
|
||||||
POWER_Utils::adc_ctrl_ON();
|
POWER_Utils::adc_ctrl_ON();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ namespace BATTERY_Utils {
|
|||||||
delay(3);
|
delay(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ADC_CTRL
|
#ifdef ADC_CTRL_PIN
|
||||||
POWER_Utils::adc_ctrl_OFF();
|
POWER_Utils::adc_ctrl_OFF();
|
||||||
|
|
||||||
#ifdef HELTEC_WP_V1
|
#ifdef HELTEC_WP_V1
|
||||||
|
|||||||
+20
-19
@@ -26,6 +26,25 @@
|
|||||||
bool shouldSleepStop = true;
|
bool shouldSleepStop = true;
|
||||||
|
|
||||||
|
|
||||||
|
void Configuration::setup() {
|
||||||
|
if (!SPIFFS.begin(false)) {
|
||||||
|
Serial.println("SPIFFS Mount Failed");
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
Serial.println("SPIFFS Mounted");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool exists = SPIFFS.exists("/igate_conf.json");
|
||||||
|
if (!exists) {
|
||||||
|
setDefaultValues();
|
||||||
|
writeFile();
|
||||||
|
delay(1000);
|
||||||
|
ESP.restart();
|
||||||
|
}
|
||||||
|
|
||||||
|
readFile();
|
||||||
|
}
|
||||||
|
|
||||||
bool Configuration::writeFile() {
|
bool Configuration::writeFile() {
|
||||||
Serial.println("Saving configuration...");
|
Serial.println("Saving configuration...");
|
||||||
|
|
||||||
@@ -87,6 +106,7 @@ bool Configuration::writeFile() {
|
|||||||
|
|
||||||
data["digi"]["mode"] = digi.mode;
|
data["digi"]["mode"] = digi.mode;
|
||||||
data["digi"]["ecoMode"] = digi.ecoMode;
|
data["digi"]["ecoMode"] = digi.ecoMode;
|
||||||
|
if (digi.ecoMode == 1) data["aprs_is"]["active"] = false;
|
||||||
#if defined(HAS_A7670)
|
#if defined(HAS_A7670)
|
||||||
if (digi.ecoMode == 1) data["digi"]["ecoMode"] = 2;
|
if (digi.ecoMode == 1) data["digi"]["ecoMode"] = 2;
|
||||||
#endif
|
#endif
|
||||||
@@ -556,23 +576,4 @@ void Configuration::setDefaultValues() {
|
|||||||
rememberStationTime = 30;
|
rememberStationTime = 30;
|
||||||
|
|
||||||
Serial.println("New Data Created... All is Written!");
|
Serial.println("New Data Created... All is Written!");
|
||||||
}
|
|
||||||
|
|
||||||
Configuration::Configuration() {
|
|
||||||
if (!SPIFFS.begin(false)) {
|
|
||||||
Serial.println("SPIFFS Mount Failed");
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
Serial.println("SPIFFS Mounted");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool exists = SPIFFS.exists("/igate_conf.json");
|
|
||||||
if (!exists) {
|
|
||||||
setDefaultValues();
|
|
||||||
writeFile();
|
|
||||||
delay(1000);
|
|
||||||
ESP.restart();
|
|
||||||
}
|
|
||||||
|
|
||||||
readFile();
|
|
||||||
}
|
}
|
||||||
+8
-8
@@ -57,7 +57,7 @@
|
|||||||
String lastEpaperText;
|
String lastEpaperText;
|
||||||
#else
|
#else
|
||||||
#include <Adafruit_GFX.h>
|
#include <Adafruit_GFX.h>
|
||||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
#ifdef HAS_SH1106
|
||||||
#include <Adafruit_SH110X.h>
|
#include <Adafruit_SH110X.h>
|
||||||
Adafruit_SH1106G display(128, 64, &Wire, OLED_RST);
|
Adafruit_SH1106G display(128, 64, &Wire, OLED_RST);
|
||||||
#else
|
#else
|
||||||
@@ -117,7 +117,7 @@ void displaySetup() {
|
|||||||
digitalWrite(OLED_RST, HIGH);
|
digitalWrite(OLED_RST, HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
#ifdef HAS_SH1106
|
||||||
if (display.begin(0x3c, false)) {
|
if (display.begin(0x3c, false)) {
|
||||||
displayFound = true;
|
displayFound = true;
|
||||||
if (Config.display.turn180) display.setRotation(2);
|
if (Config.display.turn180) display.setRotation(2);
|
||||||
@@ -157,7 +157,7 @@ void displayToggle(bool toggle) {
|
|||||||
display.printCenter("EPAPER Display Disabled by toggle...");
|
display.printCenter("EPAPER Display Disabled by toggle...");
|
||||||
display.update();
|
display.update();
|
||||||
#else
|
#else
|
||||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
#ifdef HAS_SH1106
|
||||||
if (displayFound) display.oled_command(SH110X_DISPLAYON);
|
if (displayFound) display.oled_command(SH110X_DISPLAYON);
|
||||||
#else
|
#else
|
||||||
if (displayFound) display.ssd1306_command(SSD1306_DISPLAYON);
|
if (displayFound) display.ssd1306_command(SSD1306_DISPLAYON);
|
||||||
@@ -171,7 +171,7 @@ void displayToggle(bool toggle) {
|
|||||||
#ifdef HAS_EPAPER
|
#ifdef HAS_EPAPER
|
||||||
display.update();
|
display.update();
|
||||||
#else
|
#else
|
||||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
#ifdef HAS_SH1106
|
||||||
if (displayFound) display.oled_command(SH110X_DISPLAYOFF);
|
if (displayFound) display.oled_command(SH110X_DISPLAYOFF);
|
||||||
#else
|
#else
|
||||||
if (displayFound) display.ssd1306_command(SSD1306_DISPLAYOFF);
|
if (displayFound) display.ssd1306_command(SSD1306_DISPLAYOFF);
|
||||||
@@ -222,7 +222,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||||||
#else
|
#else
|
||||||
if (displayFound) {
|
if (displayFound) {
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
#ifdef HAS_SH1106
|
||||||
display.setTextColor(SH110X_WHITE);
|
display.setTextColor(SH110X_WHITE);
|
||||||
#else
|
#else
|
||||||
display.setTextColor(WHITE);
|
display.setTextColor(WHITE);
|
||||||
@@ -234,7 +234,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||||||
display.setCursor(0, 8 + (8 * i));
|
display.setCursor(0, 8 + (8 * i));
|
||||||
display.println(*lines[i]);
|
display.println(*lines[i]);
|
||||||
}
|
}
|
||||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
#ifdef HAS_SH1106
|
||||||
display.setContrast(1);
|
display.setContrast(1);
|
||||||
#else
|
#else
|
||||||
display.ssd1306_command(SSD1306_SETCONTRAST);
|
display.ssd1306_command(SSD1306_SETCONTRAST);
|
||||||
@@ -288,7 +288,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||||||
#else
|
#else
|
||||||
if (displayFound) {
|
if (displayFound) {
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
#ifdef HAS_SH1106
|
||||||
display.setTextColor(SH110X_WHITE);
|
display.setTextColor(SH110X_WHITE);
|
||||||
#else
|
#else
|
||||||
display.setTextColor(WHITE);
|
display.setTextColor(WHITE);
|
||||||
@@ -301,7 +301,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||||||
display.setCursor(0, 16 + (8 * i));
|
display.setCursor(0, 16 + (8 * i));
|
||||||
display.println(*lines[i]);
|
display.println(*lines[i]);
|
||||||
}
|
}
|
||||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
#ifdef HAS_SH1106
|
||||||
display.setContrast(1);
|
display.setContrast(1);
|
||||||
#else
|
#else
|
||||||
display.ssd1306_command(SSD1306_SETCONTRAST);
|
display.ssd1306_command(SSD1306_SETCONTRAST);
|
||||||
|
|||||||
+7
-16
@@ -29,29 +29,20 @@ bool validateKISSFrame(const String& kissFormattedFrame) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String encodeAddressAX25(String tnc2Address) {
|
String encodeAddressAX25(String tnc2Address) {
|
||||||
bool hasBeenDigipited = tnc2Address.indexOf('*') != -1;
|
bool hasBeenDigipited = tnc2Address.indexOf('*') != -1;
|
||||||
int tnc2AddressIndex = tnc2Address.indexOf('-');
|
if (tnc2Address.indexOf('-') == -1) {
|
||||||
if (tnc2AddressIndex == -1) {
|
if (hasBeenDigipited) tnc2Address = tnc2Address.substring(0, tnc2Address.length() - 1);
|
||||||
if (hasBeenDigipited) {
|
|
||||||
tnc2Address = tnc2Address.substring(0, tnc2Address.length() - 1);
|
|
||||||
}
|
|
||||||
tnc2Address += "-0";
|
tnc2Address += "-0";
|
||||||
}
|
}
|
||||||
|
|
||||||
int separatorIndex = tnc2AddressIndex;
|
int separatorIndex = tnc2Address.indexOf('-');;
|
||||||
int ssid = tnc2Address.substring(separatorIndex + 1).toInt();
|
int ssid = tnc2Address.substring(separatorIndex + 1).toInt();
|
||||||
|
|
||||||
String kissAddress = "";
|
String kissAddress = "";
|
||||||
for (int i = 0; i < 6; ++i) {
|
for (int i = 0; i < 6; ++i) {
|
||||||
char addressChar;
|
char addressChar = ' ';
|
||||||
if (tnc2Address.length() > i && i < separatorIndex) {
|
if (tnc2Address.length() > i && i < separatorIndex) addressChar = tnc2Address.charAt(i);
|
||||||
addressChar = tnc2Address.charAt(i);
|
|
||||||
} else {
|
|
||||||
addressChar = ' ';
|
|
||||||
}
|
|
||||||
kissAddress += (char)(addressChar << 1);
|
kissAddress += (char)(addressChar << 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
kissAddress += (char)((ssid << 1) | 0b01100000 | (hasBeenDigipited ? HAS_BEEN_DIGIPITED_MASK : 0));
|
kissAddress += (char)((ssid << 1) | 0b01100000 | (hasBeenDigipited ? HAS_BEEN_DIGIPITED_MASK : 0));
|
||||||
return kissAddress;
|
return kissAddress;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -263,8 +263,8 @@ namespace POWER_Utils {
|
|||||||
pinMode(Config.battery.externalVoltagePin, INPUT);
|
pinMode(Config.battery.externalVoltagePin, INPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VEXT_CTRL
|
#ifdef VEXT_CTRL_PIN
|
||||||
pinMode(VEXT_CTRL,OUTPUT); // GPS + TFT on HELTEC Wireless_Tracker and only for Oled in HELTEC V3
|
pinMode(VEXT_CTRL_PIN,OUTPUT); // GPS + TFT on HELTEC Wireless_Tracker and only for Oled in HELTEC V3
|
||||||
vext_ctrl_ON();
|
vext_ctrl_ON();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -272,8 +272,8 @@ namespace POWER_Utils {
|
|||||||
if (Config.beacon.gpsActive && Config.digi.ecoMode != 1) activateGPS();
|
if (Config.beacon.gpsActive && Config.digi.ecoMode != 1) activateGPS();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ADC_CTRL
|
#ifdef ADC_CTRL_PIN
|
||||||
pinMode(ADC_CTRL, OUTPUT);
|
pinMode(ADC_CTRL_PIN, OUTPUT);
|
||||||
adc_ctrl_OFF();
|
adc_ctrl_OFF();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+21
-18
@@ -62,8 +62,7 @@ extern bool sendEUP; // Equations Units Parameters
|
|||||||
|
|
||||||
extern std::vector<LastHeardStation> lastHeardStations;
|
extern std::vector<LastHeardStation> lastHeardStations;
|
||||||
|
|
||||||
bool statusAfterBoot = true;
|
bool statusUpdate = true;
|
||||||
|
|
||||||
bool beaconUpdate = false;
|
bool beaconUpdate = false;
|
||||||
uint32_t lastBeaconTx = 0;
|
uint32_t lastBeaconTx = 0;
|
||||||
uint32_t lastScreenOn = millis();
|
uint32_t lastScreenOn = millis();
|
||||||
@@ -76,26 +75,30 @@ String secondaryBeaconPacket;
|
|||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
void processStatus() {
|
void processStatus() {
|
||||||
String status = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
|
bool sendOverAPRSIS = Config.beacon.sendViaAPRSIS && Config.aprs_is.active && WiFi.status() == WL_CONNECTED;
|
||||||
|
bool sendOverRF = !Config.beacon.sendViaAPRSIS && Config.beacon.sendViaRF;
|
||||||
|
|
||||||
if (WiFi.status() == WL_CONNECTED && Config.aprs_is.active && Config.beacon.sendViaAPRSIS) {
|
if (!sendOverAPRSIS && !sendOverRF) {
|
||||||
delay(1000);
|
statusUpdate = false;
|
||||||
status.concat(",qAC:>");
|
return;
|
||||||
status.concat(Config.beacon.statusPacket);
|
|
||||||
APRS_IS_Utils::upload(status);
|
|
||||||
SYSLOG_Utils::log(2, status, 0, 0.0, 0); // APRSIS TX
|
|
||||||
}
|
}
|
||||||
if (statusAfterBoot && !Config.beacon.sendViaAPRSIS && Config.beacon.sendViaRF) {
|
|
||||||
status.concat(":>");
|
String statusPacket = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
|
||||||
status.concat(Config.beacon.statusPacket);
|
statusPacket += sendOverAPRSIS ? ",qAC:>" : ":>";
|
||||||
STATION_Utils::addToOutputPacketBuffer(status, true); // treated also as beacon on Tx Freq
|
statusPacket += Config.beacon.statusPacket;
|
||||||
|
|
||||||
|
if (sendOverAPRSIS) {
|
||||||
|
APRS_IS_Utils::upload(statusPacket);
|
||||||
|
SYSLOG_Utils::log(2, statusPacket, 0, 0.0, 0); // APRSIS TX
|
||||||
|
} else {
|
||||||
|
STATION_Utils::addToOutputPacketBuffer(statusPacket, true); // treated also as beacon on Tx Freq
|
||||||
}
|
}
|
||||||
statusAfterBoot = false;
|
statusUpdate = false;
|
||||||
lastStatusTx = millis();
|
lastStatusTx = millis();
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkStatusInterval() {
|
void checkStatusInterval() {
|
||||||
if (lastStatusTx == 0 || millis() - lastStatusTx > DAY_MS) statusAfterBoot = true;
|
if (lastStatusTx == 0 || millis() - lastStatusTx > DAY_MS) statusUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String getLocalIP() {
|
String getLocalIP() {
|
||||||
@@ -292,7 +295,7 @@ namespace Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkStatusInterval();
|
checkStatusInterval();
|
||||||
if (statusAfterBoot && Config.beacon.statusActive && !Config.beacon.statusPacket.isEmpty()) processStatus();
|
if (statusUpdate && Config.beacon.statusActive && !Config.beacon.statusPacket.isEmpty()) processStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkDisplayInterval() {
|
void checkDisplayInterval() {
|
||||||
@@ -405,9 +408,9 @@ namespace Utils {
|
|||||||
if (mode == 1) { // low voltage detected after a while
|
if (mode == 1) { // low voltage detected after a while
|
||||||
displayToggle(false);
|
displayToggle(false);
|
||||||
}
|
}
|
||||||
#ifdef VEXT_CTRL
|
#ifdef VEXT_CTRL_PIN
|
||||||
#ifndef HELTEC_WSL_V3
|
#ifndef HELTEC_WSL_V3
|
||||||
digitalWrite(VEXT_CTRL, LOW);
|
digitalWrite(VEXT_CTRL_PIN, LOW);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
LoRa_Utils::sleepRadio();
|
LoRa_Utils::sleepRadio();
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/* Copyright (C) 2025 Ricardo Guzman - CA2RXU
|
||||||
|
*
|
||||||
|
* This file is part of LoRa APRS iGate.
|
||||||
|
*
|
||||||
|
* LoRa APRS iGate is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* LoRa APRS iGate is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_PINOUT_H_
|
||||||
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
// LoRa Radio
|
||||||
|
#define HAS_SX1268
|
||||||
|
#define HAS_1W_LORA
|
||||||
|
#define HAS_TCXO
|
||||||
|
#define RADIO_SCLK_PIN 18
|
||||||
|
#define RADIO_MISO_PIN 19
|
||||||
|
#define RADIO_MOSI_PIN 23
|
||||||
|
#define RADIO_CS_PIN 5
|
||||||
|
#define RADIO_RST_PIN 27
|
||||||
|
#define RADIO_DIO1_PIN 12
|
||||||
|
#define RADIO_BUSY_PIN 14
|
||||||
|
#define RADIO_RXEN 32
|
||||||
|
#define RADIO_TXEN 25
|
||||||
|
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||||
|
#define GPIO_WAKEUP_PIN GPIO_SEL_12
|
||||||
|
|
||||||
|
// I2C
|
||||||
|
#define USE_WIRE_WITH_OLED_PINS
|
||||||
|
|
||||||
|
// Display
|
||||||
|
#define HAS_DISPLAY
|
||||||
|
#define HAS_SH1106
|
||||||
|
|
||||||
|
#undef OLED_SDA
|
||||||
|
#undef OLED_SCL
|
||||||
|
#undef OLED_RST
|
||||||
|
|
||||||
|
#define OLED_SDA 21
|
||||||
|
#define OLED_SCL 22
|
||||||
|
#define OLED_RST -1 // Reset pin # (or -1 if sharing Arduino reset pin)
|
||||||
|
|
||||||
|
// GPS
|
||||||
|
#define HAS_GPS
|
||||||
|
#define GPS_BAUDRATE 9600
|
||||||
|
#define GPS_RX 17
|
||||||
|
#define GPS_TX 16
|
||||||
|
|
||||||
|
// Aditional Config
|
||||||
|
#define INTERNAL_LED_PIN 2
|
||||||
|
#define BATTERY_PIN 35
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[env:ESP32_9M2IBR_1W_LoRa_GPS]
|
||||||
|
board = esp32dev
|
||||||
|
build_flags =
|
||||||
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
|
-D ESP32_9M2IBR_1W_LoRa_GPS
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
${common.display_libs}
|
||||||
|
adafruit/Adafruit SH110X @ 2.1.10
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
#define INTERNAL_LED_PIN 25
|
#define INTERNAL_LED_PIN 25
|
||||||
#define BATTERY_PIN 37
|
#define BATTERY_PIN 37
|
||||||
|
|
||||||
#define ADC_CTRL 21
|
#define ADC_CTRL_PIN 21
|
||||||
#define ADC_CTRL_ON_STATE LOW
|
#define ADC_CTRL_ON_STATE LOW
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
// Display
|
// Display
|
||||||
#define HAS_DISPLAY
|
#define HAS_DISPLAY
|
||||||
|
#define HAS_SH1106
|
||||||
|
|
||||||
#undef OLED_SDA
|
#undef OLED_SDA
|
||||||
#undef OLED_SCL
|
#undef OLED_SCL
|
||||||
|
|||||||
Reference in New Issue
Block a user