mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-07-13 21:31:14 +02:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ffd3eaeb49 | |||
| df03a49123 | |||
| 58d647bad1 | |||
| 59988fbaf1 | |||
| 1ad13e3c09 | |||
| ffe1a2f830 | |||
| a0fdd78cb1 | |||
| 95e437cb50 | |||
| 9c488991e2 | |||
| ddcd33b94a | |||
| b688391a0e | |||
| 56d63d0389 | |||
| ad5a5ccf18 | |||
| 92bc0a7667 |
@@ -78,7 +78,9 @@ jobs:
|
|||||||
- name: QRPLabs_LightGateway_1_0
|
- name: QRPLabs_LightGateway_1_0
|
||||||
chip: esp32s3
|
chip: esp32s3
|
||||||
- name: XIAO_ESP32S3_WIO_SX1262
|
- name: XIAO_ESP32S3_WIO_SX1262
|
||||||
chip: esp32s3
|
chip: esp32s3
|
||||||
|
- name: TROY_LoRa_APRS
|
||||||
|
chip: esp32
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ ____________________________________________________
|
|||||||
|
|
||||||
## Timeline (Versions):
|
## Timeline (Versions):
|
||||||
|
|
||||||
|
- 2025.01.02 Callsign Black List added.
|
||||||
|
- 2024.12.30 Fixed missing validation for correct Digipeater mode when not connected to APRS-IS.
|
||||||
|
- 2024.12.06 APRS-IS connnection and passcode validation added.
|
||||||
- 2024.11.06 (Silent Update) Working now with Board "VARIANTS".
|
- 2024.11.06 (Silent Update) Working now with Board "VARIANTS".
|
||||||
- 2024.10.29 Added LILYGO Lora32 T3S3 support.
|
- 2024.10.29 Added LILYGO Lora32 T3S3 support.
|
||||||
- 2024.10.25 Added QRP Labs LightGateway 1.0 support.
|
- 2024.10.25 Added QRP Labs LightGateway 1.0 support.
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
"externalSleepVoltage": 10.9,
|
"externalSleepVoltage": 10.9,
|
||||||
"voltageDividerR1": 100.0,
|
"voltageDividerR1": 100.0,
|
||||||
"voltageDividerR2": 27.0,
|
"voltageDividerR2": 27.0,
|
||||||
"sendVoltageAsTelemetry": true
|
"sendVoltageAsTelemetry": false
|
||||||
},
|
},
|
||||||
"wxsensor": {
|
"wxsensor": {
|
||||||
"active": false,
|
"active": false,
|
||||||
@@ -65,8 +65,8 @@
|
|||||||
},
|
},
|
||||||
"syslog": {
|
"syslog": {
|
||||||
"active": false,
|
"active": false,
|
||||||
"server": "192.168.0.100",
|
"server": "lora.link9.net",
|
||||||
"port": 514
|
"port": 1514
|
||||||
},
|
},
|
||||||
"tnc": {
|
"tnc": {
|
||||||
"enableServer": false,
|
"enableServer": false,
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
"password": ""
|
"password": ""
|
||||||
},
|
},
|
||||||
"ntp": {
|
"ntp": {
|
||||||
"gmtCorrection": 0
|
"gmtCorrection": 0.0
|
||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"rememberStationTime": 30,
|
"rememberStationTime": 30,
|
||||||
@@ -92,5 +92,6 @@
|
|||||||
"rebootMode": false,
|
"rebootMode": false,
|
||||||
"rebootModeTime": 6
|
"rebootModeTime": 6
|
||||||
},
|
},
|
||||||
"personalNote": ""
|
"personalNote": "",
|
||||||
|
"blackList": ""
|
||||||
}
|
}
|
||||||
+44
-3
@@ -573,6 +573,47 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
|
<div class="row my-5 d-flex align-items-top">
|
||||||
|
<div class="col-lg-3 col-sm-12">
|
||||||
|
<h5>
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="20"
|
||||||
|
height="20"
|
||||||
|
fill="currentColor"
|
||||||
|
class="bi bi-broadcast-pin"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M3.05 3.05a7 7 0 0 0 0 9.9.5.5 0 0 1-.707.707 8 8 0 0 1 0-11.314.5.5 0 0 1 .707.707m2.122 2.122a4 4 0 0 0 0 5.656.5.5 0 1 1-.708.708 5 5 0 0 1 0-7.072.5.5 0 0 1 .708.708m5.656-.708a.5.5 0 0 1 .708 0 5 5 0 0 1 0 7.072.5.5 0 1 1-.708-.708 4 4 0 0 0 0-5.656.5.5 0 0 1 0-.708m2.122-2.12a.5.5 0 0 1 .707 0 8 8 0 0 1 0 11.313.5.5 0 0 1-.707-.707 7 7 0 0 0 0-9.9.5.5 0 0 1 0-.707zM6 8a2 2 0 1 1 2.5 1.937V15.5a.5.5 0 0 1-1 0V9.937A2 2 0 0 1 6 8"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
Black List
|
||||||
|
</h5>
|
||||||
|
<small>Add Callsigns with space between them to Black List them (* wild card allowed)</small>
|
||||||
|
</div>
|
||||||
|
<div class="col-9 mt-2">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<label
|
||||||
|
for="blackList"
|
||||||
|
class="form-label"
|
||||||
|
>Black List</label
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="blackList"
|
||||||
|
id="blackList"
|
||||||
|
class="form-control"
|
||||||
|
placeholder="Station Callsign"
|
||||||
|
oninput="this.value = this.value.toUpperCase();"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<div class="row my-5 d-flex align-items-top">
|
<div class="row my-5 d-flex align-items-top">
|
||||||
<div class="col-lg-3 col-sm-12">
|
<div class="col-lg-3 col-sm-12">
|
||||||
<h5>
|
<h5>
|
||||||
@@ -1703,9 +1744,9 @@
|
|||||||
id="ntp.gmtCorrection"
|
id="ntp.gmtCorrection"
|
||||||
placeholder="0"
|
placeholder="0"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
step="1"
|
step="0.25"
|
||||||
min="-23"
|
min="-23.75"
|
||||||
max="23"
|
max="23.75"
|
||||||
/>
|
/>
|
||||||
<span class="input-group-text"
|
<span class="input-group-text"
|
||||||
>hours</span
|
>hours</span
|
||||||
|
|||||||
@@ -137,6 +137,9 @@ function loadSettings(settings) {
|
|||||||
document.getElementById("beacon.gpsActive").checked = settings.beacon.gpsActive;
|
document.getElementById("beacon.gpsActive").checked = settings.beacon.gpsActive;
|
||||||
document.getElementById("beacon.gpsAmbiguity").checked = settings.beacon.gpsAmbiguity;
|
document.getElementById("beacon.gpsAmbiguity").checked = settings.beacon.gpsAmbiguity;
|
||||||
|
|
||||||
|
// Black List
|
||||||
|
document.getElementById("blackList").value = settings.blackList;
|
||||||
|
|
||||||
// Digi
|
// Digi
|
||||||
document.getElementById("digi.mode").value = settings.digi.mode;
|
document.getElementById("digi.mode").value = settings.digi.mode;
|
||||||
document.getElementById("digi.ecoMode").checked = settings.digi.ecoMode;
|
document.getElementById("digi.ecoMode").checked = settings.digi.ecoMode;
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ public:
|
|||||||
bool ecoMode;
|
bool ecoMode;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class LoraModule {
|
class LoraModule {
|
||||||
public:
|
public:
|
||||||
long txFreq;
|
long txFreq;
|
||||||
@@ -120,11 +119,10 @@ public:
|
|||||||
|
|
||||||
class NTP {
|
class NTP {
|
||||||
public:
|
public:
|
||||||
int gmtCorrection;
|
float gmtCorrection;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Configuration {
|
class Configuration {
|
||||||
public:
|
public:
|
||||||
String callsign;
|
String callsign;
|
||||||
@@ -135,6 +133,7 @@ public:
|
|||||||
bool rebootMode;
|
bool rebootMode;
|
||||||
int rebootModeTime;
|
int rebootModeTime;
|
||||||
String personalNote;
|
String personalNote;
|
||||||
|
String blackList;
|
||||||
std::vector<WiFi_AP> wifiAPs;
|
std::vector<WiFi_AP> wifiAPs;
|
||||||
WiFi_Auto_AP wifiAutoAP;
|
WiFi_Auto_AP wifiAutoAP;
|
||||||
BEACON beacon;
|
BEACON beacon;
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ struct LastHeardStation {
|
|||||||
|
|
||||||
namespace STATION_Utils {
|
namespace STATION_Utils {
|
||||||
|
|
||||||
|
void loadBlackList();
|
||||||
|
bool checkBlackList(const String& callsign);
|
||||||
void deleteNotHeard();
|
void deleteNotHeard();
|
||||||
void updateLastHeard(const String& station);
|
void updateLastHeard(const String& station);
|
||||||
bool wasHeard(const String& station);
|
bool wasHeard(const String& station);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ ___________________________________________________________________*/
|
|||||||
#include "A7670_utils.h"
|
#include "A7670_utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
String versionDate = "2024.12.30";
|
String versionDate = "2025.01.07";
|
||||||
Configuration Config;
|
Configuration Config;
|
||||||
WiFiClient espClient;
|
WiFiClient espClient;
|
||||||
#ifdef HAS_GPS
|
#ifdef HAS_GPS
|
||||||
@@ -79,6 +79,7 @@ void setup() {
|
|||||||
LoRa_Utils::setup();
|
LoRa_Utils::setup();
|
||||||
Utils::validateFreqs();
|
Utils::validateFreqs();
|
||||||
GPS_Utils::setup();
|
GPS_Utils::setup();
|
||||||
|
STATION_Utils::loadBlackList();
|
||||||
|
|
||||||
#ifdef STARTUP_DELAY // (TEST) just to wait for WiFi init of Routers
|
#ifdef STARTUP_DELAY // (TEST) just to wait for WiFi init of Routers
|
||||||
displayShow("", " STARTUP DELAY ...", "", "", 0);
|
displayShow("", " STARTUP DELAY ...", "", "", 0);
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ namespace APRS_IS_Utils {
|
|||||||
int firstColonIndex = packet.indexOf(":");
|
int firstColonIndex = packet.indexOf(":");
|
||||||
if (firstColonIndex > 5 && firstColonIndex < (packet.length() - 1) && packet[firstColonIndex + 1] != '}' && packet.indexOf("TCPIP") == -1) {
|
if (firstColonIndex > 5 && firstColonIndex < (packet.length() - 1) && packet[firstColonIndex + 1] != '}' && packet.indexOf("TCPIP") == -1) {
|
||||||
const String& Sender = packet.substring(3, packet.indexOf(">"));
|
const String& Sender = packet.substring(3, packet.indexOf(">"));
|
||||||
if (Sender != Config.callsign && Utils::checkValidCallsign(Sender)) {
|
if (Sender != Config.callsign && Utils::checkValidCallsign(Sender) && !STATION_Utils::checkBlackList(Sender)) {
|
||||||
STATION_Utils::updateLastHeard(Sender);
|
STATION_Utils::updateLastHeard(Sender);
|
||||||
Utils::typeOfPacket(packet.substring(3), 0); // LoRa-APRS
|
Utils::typeOfPacket(packet.substring(3), 0); // LoRa-APRS
|
||||||
const String& AddresseeAndMessage = packet.substring(packet.indexOf("::") + 2);
|
const String& AddresseeAndMessage = packet.substring(packet.indexOf("::") + 2);
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ void Configuration::writeFile() {
|
|||||||
|
|
||||||
data["personalNote"] = personalNote;
|
data["personalNote"] = personalNote;
|
||||||
|
|
||||||
|
data["blackList"] = blackList;
|
||||||
|
|
||||||
data["webadmin"]["active"] = webadmin.active;
|
data["webadmin"]["active"] = webadmin.active;
|
||||||
data["webadmin"]["username"] = webadmin.username;
|
data["webadmin"]["username"] = webadmin.username;
|
||||||
data["webadmin"]["password"] = webadmin.password;
|
data["webadmin"]["password"] = webadmin.password;
|
||||||
@@ -209,7 +211,7 @@ bool Configuration::readFile() {
|
|||||||
webadmin.username = data["webadmin"]["username"] | "admin";
|
webadmin.username = data["webadmin"]["username"] | "admin";
|
||||||
webadmin.password = data["webadmin"]["password"] | "";
|
webadmin.password = data["webadmin"]["password"] | "";
|
||||||
|
|
||||||
ntp.gmtCorrection = data["ntp"]["gmtCorrection"] | 0;
|
ntp.gmtCorrection = data["ntp"]["gmtCorrection"] | 0.0;
|
||||||
|
|
||||||
lowPowerMode = data["other"]["lowPowerMode"] | false;
|
lowPowerMode = data["other"]["lowPowerMode"] | false;
|
||||||
lowVoltageCutOff = data["other"]["lowVoltageCutOff"] | 0;
|
lowVoltageCutOff = data["other"]["lowVoltageCutOff"] | 0;
|
||||||
@@ -219,7 +221,9 @@ bool Configuration::readFile() {
|
|||||||
rebootMode = data["other"]["rebootMode"] | false;
|
rebootMode = data["other"]["rebootMode"] | false;
|
||||||
rebootModeTime = data["other"]["rebootModeTime"] | 6;
|
rebootModeTime = data["other"]["rebootModeTime"] | 6;
|
||||||
|
|
||||||
personalNote = data["personalNote"] | "personal note here...";
|
personalNote = data["personalNote"] | "personal note here";
|
||||||
|
|
||||||
|
blackList = data["blackList"] | "station callsign";
|
||||||
|
|
||||||
if (wifiAPs.size() == 0) { // If we don't have any WiFi's from config we need to add "empty" SSID for AUTO AP
|
if (wifiAPs.size() == 0) { // If we don't have any WiFi's from config we need to add "empty" SSID for AUTO AP
|
||||||
WiFi_AP wifiap;
|
WiFi_AP wifiap;
|
||||||
@@ -327,11 +331,13 @@ void Configuration::init() {
|
|||||||
|
|
||||||
personalNote = "";
|
personalNote = "";
|
||||||
|
|
||||||
|
blackList = "";
|
||||||
|
|
||||||
webadmin.active = false;
|
webadmin.active = false;
|
||||||
webadmin.username = "admin";
|
webadmin.username = "admin";
|
||||||
webadmin.password = "";
|
webadmin.password = "";
|
||||||
|
|
||||||
ntp.gmtCorrection = 0;
|
ntp.gmtCorrection = 0.0;
|
||||||
|
|
||||||
Serial.println("All is Written!");
|
Serial.println("All is Written!");
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -130,7 +130,7 @@ namespace DIGI_Utils {
|
|||||||
temp = packet.substring(3);
|
temp = packet.substring(3);
|
||||||
Sender = packet.substring(3, packet.indexOf(">"));
|
Sender = packet.substring(3, packet.indexOf(">"));
|
||||||
}
|
}
|
||||||
if (Sender != Config.callsign) { // Avoid listening to own packets
|
if (Sender != Config.callsign && !STATION_Utils::checkBlackList(Sender)) { // Avoid listening to own packets
|
||||||
if (!thirdPartyPacket && !Utils::checkValidCallsign(Sender)) {
|
if (!thirdPartyPacket && !Utils::checkValidCallsign(Sender)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-4
@@ -1,4 +1,5 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
#include "battery_utils.h"
|
||||||
#include "station_utils.h"
|
#include "station_utils.h"
|
||||||
#include "query_utils.h"
|
#include "query_utils.h"
|
||||||
#include "lora_utils.h"
|
#include "lora_utils.h"
|
||||||
@@ -10,6 +11,8 @@ extern String versionDate;
|
|||||||
extern int rssi;
|
extern int rssi;
|
||||||
extern float snr;
|
extern float snr;
|
||||||
extern int freqError;
|
extern int freqError;
|
||||||
|
extern bool shouldSleepLowVoltage;
|
||||||
|
extern bool saveNewDigiEcoModeConfig;
|
||||||
|
|
||||||
|
|
||||||
namespace QUERY_Utils {
|
namespace QUERY_Utils {
|
||||||
@@ -53,12 +56,16 @@ namespace QUERY_Utils {
|
|||||||
answer.concat("?WHERE on development 73!");
|
answer.concat("?WHERE on development 73!");
|
||||||
} else if (queryQuestion.indexOf("?APRSEEM") == 0 && Config.digi.ecoMode == true) { // Exit Digipeater EcoMode
|
} else if (queryQuestion.indexOf("?APRSEEM") == 0 && Config.digi.ecoMode == true) { // Exit Digipeater EcoMode
|
||||||
answer = "DigiEcoMode:Stop";
|
answer = "DigiEcoMode:Stop";
|
||||||
Config.digi.ecoMode = false;
|
Config.digi.ecoMode = false;
|
||||||
Config.display.alwaysOn = true;
|
Config.display.alwaysOn = true;
|
||||||
Config.display.timeout = 10;
|
Config.display.timeout = 10;
|
||||||
|
shouldSleepLowVoltage = true; // to make sure all packets in outputPacketBuffer are sended before restart.
|
||||||
|
saveNewDigiEcoModeConfig = true;
|
||||||
} else if (queryQuestion.indexOf("?APRSSEM") == 0 && Config.digi.ecoMode == false) { // Start Digipeater EcoMode
|
} else if (queryQuestion.indexOf("?APRSSEM") == 0 && Config.digi.ecoMode == false) { // Start Digipeater EcoMode
|
||||||
answer = "DigiEcoMode:Start";
|
answer = "DigiEcoMode:Start";
|
||||||
Config.digi.ecoMode = true;
|
Config.digi.ecoMode = true;
|
||||||
|
shouldSleepLowVoltage = true; // to make sure all packets in outputPacketBuffer are sended before restart.
|
||||||
|
saveNewDigiEcoModeConfig = true;
|
||||||
} else if (queryQuestion.indexOf("?APRSEMS") == 0) { // Digipeater EcoMode Status
|
} else if (queryQuestion.indexOf("?APRSEMS") == 0) { // Digipeater EcoMode Status
|
||||||
answer = (Config.digi.ecoMode) ? "DigiEcoMode:ON" : "DigiEcoMode:OFF";
|
answer = (Config.digi.ecoMode) ? "DigiEcoMode:ON" : "DigiEcoMode:OFF";
|
||||||
}
|
}
|
||||||
|
|||||||
+34
-5
@@ -16,10 +16,41 @@ uint32_t lastTxTime = millis();
|
|||||||
std::vector<LastHeardStation> lastHeardStations;
|
std::vector<LastHeardStation> lastHeardStations;
|
||||||
std::vector<String> outputPacketBuffer;
|
std::vector<String> outputPacketBuffer;
|
||||||
std::vector<Packet25SegBuffer> packet25SegBuffer;
|
std::vector<Packet25SegBuffer> packet25SegBuffer;
|
||||||
|
std::vector<String> blackList;
|
||||||
|
|
||||||
|
bool saveNewDigiEcoModeConfig = false;
|
||||||
|
|
||||||
|
|
||||||
namespace STATION_Utils {
|
namespace STATION_Utils {
|
||||||
|
|
||||||
|
void loadBlackList() {
|
||||||
|
if (Config.blackList != "") {
|
||||||
|
String callsigns = Config.blackList;
|
||||||
|
int spaceIndex = callsigns.indexOf(" ");
|
||||||
|
|
||||||
|
while (spaceIndex >= 0) {
|
||||||
|
blackList.push_back(callsigns.substring(0, spaceIndex));
|
||||||
|
callsigns = callsigns.substring(spaceIndex + 1);
|
||||||
|
spaceIndex = callsigns.indexOf(" ");
|
||||||
|
}
|
||||||
|
callsigns.trim();
|
||||||
|
if (callsigns.length() > 0) blackList.push_back(callsigns); // Add the last word if available
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool checkBlackList(const String& callsign) {
|
||||||
|
for (int i = 0; i < blackList.size(); i++) {
|
||||||
|
if (blackList[i].indexOf("*") >= 0) { // use wild card
|
||||||
|
String wildCard = blackList[i].substring(0, blackList[i].indexOf("*"));
|
||||||
|
if (callsign.startsWith(wildCard))return true;
|
||||||
|
} else {
|
||||||
|
if (blackList[i] == callsign) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void deleteNotHeard() {
|
void deleteNotHeard() {
|
||||||
std::vector<LastHeardStation> lastHeardStation_temp;
|
std::vector<LastHeardStation> lastHeardStation_temp;
|
||||||
for (int i = 0; i < lastHeardStations.size(); i++) {
|
for (int i = 0; i < lastHeardStations.size(); i++) {
|
||||||
@@ -70,6 +101,7 @@ namespace STATION_Utils {
|
|||||||
Utils::println(" ---> Station not Heard for last 30 min (Not Tx)\n");
|
Utils::println(" ---> Station not Heard for last 30 min (Not Tx)\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clean25SegBuffer() {
|
void clean25SegBuffer() {
|
||||||
if (!packet25SegBuffer.empty() && (millis() - packet25SegBuffer[0].receivedTime) > 25 * 1000) packet25SegBuffer.erase(packet25SegBuffer.begin());
|
if (!packet25SegBuffer.empty() && (millis() - packet25SegBuffer[0].receivedTime) > 25 * 1000) packet25SegBuffer.erase(packet25SegBuffer.begin());
|
||||||
}
|
}
|
||||||
@@ -92,13 +124,8 @@ namespace STATION_Utils {
|
|||||||
int timeToWait = 3 * 1000; // 3 segs between packet Tx and also Rx ???
|
int timeToWait = 3 * 1000; // 3 segs between packet Tx and also Rx ???
|
||||||
uint32_t lastRx = millis() - lastRxTime;
|
uint32_t lastRx = millis() - lastRxTime;
|
||||||
uint32_t lastTx = millis() - lastTxTime;
|
uint32_t lastTx = millis() - lastTxTime;
|
||||||
bool saveNewDigiEcoModeConfig = false;
|
|
||||||
if (outputPacketBuffer.size() > 0 && lastTx > timeToWait && lastRx > timeToWait) {
|
if (outputPacketBuffer.size() > 0 && lastTx > timeToWait && lastRx > timeToWait) {
|
||||||
LoRa_Utils::sendNewPacket(outputPacketBuffer[0]);
|
LoRa_Utils::sendNewPacket(outputPacketBuffer[0]);
|
||||||
if (outputPacketBuffer[0].indexOf("DigiEcoMode:Start") != -1 || outputPacketBuffer[0].indexOf("DigiEcoMode:Stop") != -1) {
|
|
||||||
saveNewDigiEcoModeConfig = true;
|
|
||||||
shouldSleepLowVoltage = true; // to make sure all packets in outputPacketBuffer are sended before restart.
|
|
||||||
}
|
|
||||||
outputPacketBuffer.erase(outputPacketBuffer.begin());
|
outputPacketBuffer.erase(outputPacketBuffer.begin());
|
||||||
lastTxTime = millis();
|
lastTxTime = millis();
|
||||||
}
|
}
|
||||||
@@ -110,7 +137,9 @@ namespace STATION_Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (saveNewDigiEcoModeConfig) {
|
if (saveNewDigiEcoModeConfig) {
|
||||||
|
setCpuFrequencyMhz(80);
|
||||||
Config.writeFile();
|
Config.writeFile();
|
||||||
|
delay(1000);
|
||||||
displayToggle(false);
|
displayToggle(false);
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-5
@@ -186,7 +186,7 @@ namespace Utils {
|
|||||||
|
|
||||||
void checkBeaconInterval() {
|
void checkBeaconInterval() {
|
||||||
uint32_t lastTx = millis() - lastBeaconTx;
|
uint32_t lastTx = millis() - lastBeaconTx;
|
||||||
if (((Config.aprs_is.active && passcodeValid) || Config.digi.mode != 0) && (lastBeaconTx == 0 || lastTx >= Config.beacon.interval * 60 * 1000)) {
|
if (lastBeaconTx == 0 || lastTx >= Config.beacon.interval * 60 * 1000) {
|
||||||
beaconUpdate = true;
|
beaconUpdate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,9 +198,7 @@ namespace Utils {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (beaconUpdate) {
|
if (beaconUpdate) {
|
||||||
if (!Config.display.alwaysOn && Config.display.timeout != 0) {
|
if (!Config.display.alwaysOn && Config.display.timeout != 0) displayToggle(true);
|
||||||
displayToggle(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sendStartTelemetry && Config.battery.sendVoltageAsTelemetry && !Config.wxsensor.active && (Config.battery.sendInternalVoltage || Config.battery.sendExternalVoltage)) {
|
if (sendStartTelemetry && Config.battery.sendVoltageAsTelemetry && !Config.wxsensor.active && (Config.battery.sendInternalVoltage || Config.battery.sendExternalVoltage)) {
|
||||||
sendInitialTelemetryPackets();
|
sendInitialTelemetryPackets();
|
||||||
@@ -289,7 +287,7 @@ namespace Utils {
|
|||||||
secondaryBeaconPacket += encodedTelemetry;
|
secondaryBeaconPacket += encodedTelemetry;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.aprs_is.active && Config.beacon.sendViaAPRSIS && !backUpDigiMode) {
|
if (Config.beacon.sendViaAPRSIS && Config.aprs_is.active && passcodeValid && !backUpDigiMode) {
|
||||||
Utils::println("-- Sending Beacon to APRSIS --");
|
Utils::println("-- Sending Beacon to APRSIS --");
|
||||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING IGATE BEACON", 0);
|
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING IGATE BEACON", 0);
|
||||||
seventhLine = " listening...";
|
seventhLine = " listening...";
|
||||||
|
|||||||
+3
-1
@@ -206,13 +206,15 @@ namespace WEB_Utils {
|
|||||||
|
|
||||||
Config.personalNote = request->getParam("personalNote", true)->value();
|
Config.personalNote = request->getParam("personalNote", true)->value();
|
||||||
|
|
||||||
|
Config.blackList = request->getParam("blackList", true)->value();
|
||||||
|
|
||||||
Config.webadmin.active = request->hasParam("webadmin.active", true);
|
Config.webadmin.active = request->hasParam("webadmin.active", true);
|
||||||
if (Config.webadmin.active) {
|
if (Config.webadmin.active) {
|
||||||
Config.webadmin.username = request->getParam("webadmin.username", true)->value();
|
Config.webadmin.username = request->getParam("webadmin.username", true)->value();
|
||||||
Config.webadmin.password = request->getParam("webadmin.password", true)->value();
|
Config.webadmin.password = request->getParam("webadmin.password", true)->value();
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.ntp.gmtCorrection = request->getParam("ntp.gmtCorrection", true)->value().toInt();
|
Config.ntp.gmtCorrection = request->getParam("ntp.gmtCorrection", true)->value().toFloat();
|
||||||
|
|
||||||
Config.writeFile();
|
Config.writeFile();
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#ifndef BOARD_PINOUT_H_
|
||||||
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
// LoRa Radio
|
||||||
|
#define HAS_SX1278
|
||||||
|
#define RADIO_SCLK_PIN 5
|
||||||
|
#define RADIO_MISO_PIN 19
|
||||||
|
#define RADIO_MOSI_PIN 27
|
||||||
|
#define RADIO_CS_PIN 18
|
||||||
|
#define RADIO_RST_PIN 23
|
||||||
|
#define RADIO_BUSY_PIN 26
|
||||||
|
|
||||||
|
// Display
|
||||||
|
#define HAS_DISPLAY
|
||||||
|
|
||||||
|
#undef OLED_SDA
|
||||||
|
#undef OLED_SCL
|
||||||
|
#undef OLED_RST
|
||||||
|
|
||||||
|
#define OLED_SDA 21
|
||||||
|
#define OLED_SCL 22
|
||||||
|
#define OLED_RST -1
|
||||||
|
|
||||||
|
// GPS
|
||||||
|
#define HAS_GPS
|
||||||
|
#define GPS_RX 12
|
||||||
|
#define GPS_TX 34
|
||||||
|
|
||||||
|
// OTHER
|
||||||
|
#define INTERNAL_LED_PIN 2
|
||||||
|
#define BATTERY_PIN 35
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
[env:TROY_LoRa_APRS]
|
||||||
|
board = esp32dev
|
||||||
|
build_flags =
|
||||||
|
${common.build_flags}
|
||||||
|
-D TROY_LoRa_APRS
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
${common.display_libs}
|
||||||
Reference in New Issue
Block a user