mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-07-14 22:01:43 +02:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3cc8fed15f | |||
| 725be9fed5 | |||
| 16d9ef1c06 | |||
| d2b7c063f7 | |||
| eaced15265 | |||
| af4bc20ac2 | |||
| 14473cb7c7 |
@@ -54,6 +54,7 @@ ____________________________________________________
|
|||||||
|
|
||||||
## Timeline (Versions):
|
## Timeline (Versions):
|
||||||
|
|
||||||
|
- 2025-04-20000000
|
||||||
- 2025.03.20 Manager List added to enable/disable DigiEcoMode and Tx Control. Thanks LB5JJ.
|
- 2025.03.20 Manager List added to enable/disable DigiEcoMode and Tx Control. Thanks LB5JJ.
|
||||||
- 2025.03.03 T-Beam Supreme board added and more BlackList rules added.
|
- 2025.03.03 T-Beam Supreme board added and more BlackList rules added.
|
||||||
- 2025.02.28 Heltec Wireless Paper with Epaper working. Thanks SzymonPriv for pointing to the right library.
|
- 2025.02.28 Heltec Wireless Paper with Epaper working. Thanks SzymonPriv for pointing to the right library.
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ ___________________________________________________________________*/
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
String versionDate = "2025-04-24";
|
String versionDate = "2025-04-25";
|
||||||
Configuration Config;
|
Configuration Config;
|
||||||
WiFiClient espClient;
|
WiFiClient espClient;
|
||||||
#ifdef HAS_GPS
|
#ifdef HAS_GPS
|
||||||
@@ -203,4 +203,10 @@ void loop() {
|
|||||||
Utils::checkRebootTime();
|
Utils::checkRebootTime();
|
||||||
Utils::checkSleepByLowBatteryVoltage(1);
|
Utils::checkSleepByLowBatteryVoltage(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ESP32 (and ESPS3) work?
|
||||||
|
|
||||||
|
// ESP32C3 :
|
||||||
|
// - HT-CT62 sleeps??
|
||||||
|
// - and others?
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "aprs_is_utils.h"
|
#include "aprs_is_utils.h"
|
||||||
#include "station_utils.h"
|
#include "station_utils.h"
|
||||||
|
#include "board_pinout.h"
|
||||||
#include "syslog_utils.h"
|
#include "syslog_utils.h"
|
||||||
#include "query_utils.h"
|
#include "query_utils.h"
|
||||||
#include "A7670_utils.h"
|
#include "A7670_utils.h"
|
||||||
@@ -370,7 +371,6 @@ namespace APRS_IS_Utils {
|
|||||||
listenAPRSIS();
|
listenAPRSIS();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Config.digi.ecoMode == 1) displayToggle(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,9 @@
|
|||||||
#include "display.h"
|
#include "display.h"
|
||||||
|
|
||||||
|
|
||||||
|
bool shouldSleepStop = true;
|
||||||
|
|
||||||
|
|
||||||
void Configuration::writeFile() {
|
void Configuration::writeFile() {
|
||||||
Serial.println("Saving config...");
|
Serial.println("Saving config...");
|
||||||
|
|
||||||
@@ -166,6 +169,7 @@ bool Configuration::readFile() {
|
|||||||
|
|
||||||
digi.mode = data["digi"]["mode"] | 0;
|
digi.mode = data["digi"]["mode"] | 0;
|
||||||
digi.ecoMode = data["digi"]["ecoMode"] | 0;
|
digi.ecoMode = data["digi"]["ecoMode"] | 0;
|
||||||
|
if (digi.ecoMode == 1) shouldSleepStop = false;
|
||||||
|
|
||||||
loramodule.txFreq = data["lora"]["txFreq"] | 433775000;
|
loramodule.txFreq = data["lora"]["txFreq"] | 433775000;
|
||||||
loramodule.rxFreq = data["lora"]["rxFreq"] | 433775000;
|
loramodule.rxFreq = data["lora"]["rxFreq"] | 433775000;
|
||||||
|
|||||||
+1
-1
@@ -225,7 +225,7 @@ namespace GPS_Utils {
|
|||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
#ifdef HAS_GPS
|
#ifdef HAS_GPS
|
||||||
if (Config.beacon.gpsActive) {
|
if (Config.beacon.gpsActive && Config.digi.ecoMode != 1) {
|
||||||
gpsSerial.begin(GPS_BAUD, SERIAL_8N1, GPS_TX, GPS_RX);
|
gpsSerial.begin(GPS_BAUD, SERIAL_8N1, GPS_TX, GPS_RX);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+2
-8
@@ -133,8 +133,7 @@ namespace LoRa_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef INTERNAL_LED_PIN
|
#ifdef INTERNAL_LED_PIN
|
||||||
//if (Config.digi.ecoMode != 1)
|
if (Config.digi.ecoMode != 1) digitalWrite(INTERNAL_LED_PIN, HIGH); // disabled in Ultra Eco Mode
|
||||||
digitalWrite(INTERNAL_LED_PIN, HIGH); // disabled in Ultra Eco Mode
|
|
||||||
#endif
|
#endif
|
||||||
int state = radio.transmit("\x3c\xff\x01" + newPacket);
|
int state = radio.transmit("\x3c\xff\x01" + newPacket);
|
||||||
transmitFlag = true;
|
transmitFlag = true;
|
||||||
@@ -149,18 +148,13 @@ namespace LoRa_Utils {
|
|||||||
Utils::println(String(state));
|
Utils::println(String(state));
|
||||||
}
|
}
|
||||||
#ifdef INTERNAL_LED_PIN
|
#ifdef INTERNAL_LED_PIN
|
||||||
//if (Config.digi.ecoMode != 1)
|
if (Config.digi.ecoMode != 1) digitalWrite(INTERNAL_LED_PIN, LOW); // disabled in Ultra Eco Mode
|
||||||
digitalWrite(INTERNAL_LED_PIN, LOW); // disabled in Ultra Eco Mode
|
|
||||||
#endif
|
#endif
|
||||||
if (Config.loramodule.txFreq != Config.loramodule.rxFreq) {
|
if (Config.loramodule.txFreq != Config.loramodule.rxFreq) {
|
||||||
changeFreqRx();
|
changeFreqRx();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*void startReceive() {
|
|
||||||
radio.startReceive();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
String receivePacketFromSleep() {
|
String receivePacketFromSleep() {
|
||||||
String packet = "";
|
String packet = "";
|
||||||
int state = radio.readData(packet);
|
int state = radio.readData(packet);
|
||||||
|
|||||||
+10
-8
@@ -223,17 +223,19 @@ namespace POWER_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VEXT_CTRL
|
#ifdef VEXT_CTRL
|
||||||
pinMode(VEXT_CTRL,OUTPUT); // GPS + TFT on HELTEC Wireless_Tracker and only for Oled in HELTEC V3
|
if (Config.digi.ecoMode != 1) {
|
||||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3)
|
pinMode(VEXT_CTRL,OUTPUT); // GPS + TFT on HELTEC Wireless_Tracker and only for Oled in HELTEC V3
|
||||||
digitalWrite(VEXT_CTRL, HIGH);
|
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3)
|
||||||
#endif
|
digitalWrite(VEXT_CTRL, HIGH);
|
||||||
#if defined(HELTEC_WP) || defined(HELTEC_WS) || defined(HELTEC_V3_2)
|
#endif
|
||||||
digitalWrite(VEXT_CTRL, LOW);
|
#if defined(HELTEC_WP) || defined(HELTEC_WS) || defined(HELTEC_V3_2)
|
||||||
#endif
|
digitalWrite(VEXT_CTRL, LOW);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAS_GPS
|
#ifdef HAS_GPS
|
||||||
if (Config.beacon.gpsActive) activateGPS();
|
if (Config.beacon.gpsActive && Config.digi.ecoMode != 1) activateGPS();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ADC_CTRL
|
#ifdef ADC_CTRL
|
||||||
|
|||||||
+10
-9
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
extern Configuration Config;
|
extern Configuration Config;
|
||||||
|
extern bool shouldSleepStop;
|
||||||
extern uint32_t lastBeaconTx;
|
extern uint32_t lastBeaconTx;
|
||||||
|
|
||||||
bool wakeUpFlag = false;
|
bool wakeUpFlag = false;
|
||||||
@@ -48,15 +49,15 @@ namespace SLEEP_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void startSleeping() {
|
void startSleeping() {
|
||||||
uint32_t timeToSleep = getSecondsToSleep();
|
if (!shouldSleepStop) {
|
||||||
esp_sleep_enable_timer_wakeup(timeToSleep * 1000000); // 1 min = 60sec
|
uint32_t timeToSleep = getSecondsToSleep();
|
||||||
Serial.print("(Sleeping : "); Serial.print(timeToSleep); Serial.println("seconds)");
|
esp_sleep_enable_timer_wakeup(timeToSleep * 1000000); // 1 min = 60sec
|
||||||
|
Serial.print("(Sleeping : "); Serial.print(timeToSleep); Serial.println("seconds)");
|
||||||
//esp_sleep_enable_timer_wakeup(getSecondsToSleep() * 1000000); // 1 min = 60sec
|
delay(100);
|
||||||
|
LoRa_Utils::wakeRadio();
|
||||||
delay(100);
|
esp_light_sleep_start();
|
||||||
LoRa_Utils::wakeRadio();
|
}
|
||||||
esp_light_sleep_start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+1
-1
@@ -88,7 +88,7 @@ namespace Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setupDisplay() {
|
void setupDisplay() {
|
||||||
displaySetup();
|
if (Config.digi.ecoMode != 1) displaySetup();
|
||||||
#ifdef INTERNAL_LED_PIN
|
#ifdef INTERNAL_LED_PIN
|
||||||
digitalWrite(INTERNAL_LED_PIN,HIGH);
|
digitalWrite(INTERNAL_LED_PIN,HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user