mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-07-04 08:51:55 +02:00
Prepare AutoAP enable/disable
This commit is contained in:
@@ -47,6 +47,7 @@ bool Configuration::writeFile() {
|
||||
|
||||
data["other"]["startupDelay"] = startupDelay;
|
||||
|
||||
data["wifi"]["autoAP"]["enabled"] = wifiAutoAP.enabled;
|
||||
data["wifi"]["autoAP"]["password"] = wifiAutoAP.password;
|
||||
data["wifi"]["autoAP"]["timeout"] = wifiAutoAP.timeout;
|
||||
|
||||
@@ -214,8 +215,10 @@ bool Configuration::readFile() {
|
||||
if (!data["other"].containsKey("startupDelay")) needsRewrite = true;
|
||||
startupDelay = data["other"]["startupDelay"] | 0;
|
||||
|
||||
if (!data["wifi"]["autoAP"].containsKey("password") ||
|
||||
if (!data["wifi"]["autoAP"].containsKey("enabled") ||
|
||||
!data["wifi"]["autoAP"].containsKey("password") ||
|
||||
!data["wifi"]["autoAP"].containsKey("timeout")) needsRewrite = true;
|
||||
wifiAutoAP.enabled = data["wifi"]["autoAP"]["enabled"] | true;
|
||||
wifiAutoAP.password = data["wifi"]["autoAP"]["password"] | "1234567890";
|
||||
wifiAutoAP.timeout = data["wifi"]["autoAP"]["timeout"] | 10;
|
||||
|
||||
@@ -446,6 +449,7 @@ void Configuration::setDefaultValues() {
|
||||
|
||||
startupDelay = 0;
|
||||
|
||||
wifiAutoAP.enabled = true;
|
||||
wifiAutoAP.password = "1234567890";
|
||||
wifiAutoAP.timeout = 10;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user