mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-28 16:52:33 +01:00
Compare commits
1 Commits
SP_V3.2.2
...
stackTrace
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e31dbbf91f |
@@ -195,9 +195,9 @@ 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();
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ ___________________________________________________________________*/
|
|||||||
|
|
||||||
|
|
||||||
String versionDate = "2026-03-08";
|
String versionDate = "2026-03-08";
|
||||||
String versionNumber = "3.2.102";
|
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();
|
||||||
|
|||||||
@@ -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...");
|
||||||
|
|
||||||
@@ -557,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();
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user