mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-07-11 20:31:09 +02:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c80b565730 | |||
| 84cbcc30e8 | |||
| 11d413cb17 | |||
| 19d767e3cb | |||
| 803bde1008 | |||
| 8ab1f5ec24 | |||
| cfc9474469 | |||
| 949807bc14 | |||
| 35760b74f7 | |||
| b5690a2f37 | |||
| b448e2fc6b | |||
| c33720a5fb | |||
| e57fad6666 | |||
| 2418291ac9 |
+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-26";
|
String versionDate = "2026-03-08";
|
||||||
String versionNumber = "3.2";
|
String versionNumber = "3.2.101";
|
||||||
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
-20
@@ -25,11 +25,29 @@
|
|||||||
|
|
||||||
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...");
|
||||||
|
|
||||||
StaticJsonDocument<3584> data;
|
DynamicJsonDocument data(3584);
|
||||||
File configFile = SPIFFS.open("/igate_conf.json", "w");
|
File configFile = SPIFFS.open("/igate_conf.json", "w");
|
||||||
|
|
||||||
if (!configFile) {
|
if (!configFile) {
|
||||||
@@ -87,6 +105,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
|
||||||
@@ -557,22 +576,3 @@ void Configuration::setDefaultValues() {
|
|||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
+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
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -408,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();
|
||||||
|
|||||||
Reference in New Issue
Block a user