mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-04-05 06:26:46 +00:00
web user and password
This commit is contained in:
parent
60aa2b05ac
commit
ee95931f00
7 changed files with 145 additions and 3 deletions
|
|
@ -97,12 +97,16 @@ void Configuration::writeFile() {
|
|||
|
||||
data["other"]["rememberStationTime"] = rememberStationTime;
|
||||
|
||||
data["other"]["backupDigiMode"] = backupDigiMode;
|
||||
data["other"]["backupDigiMode"] = backupDigiMode;
|
||||
|
||||
data["other"]["lowPowerMode"] = lowPowerMode;
|
||||
data["other"]["lowVoltageCutOff"] = lowVoltageCutOff;
|
||||
|
||||
data["personalNote"] = personalNote;
|
||||
data["personalNote"] = personalNote;
|
||||
|
||||
data["webadmin"]["active"] = webadmin.active;
|
||||
data["webadmin"]["username"] = webadmin.username;
|
||||
data["webadmin"]["password"] = webadmin.password;
|
||||
|
||||
serializeJson(data, configFile);
|
||||
|
||||
|
|
@ -188,6 +192,10 @@ bool Configuration::readFile() {
|
|||
|
||||
personalNote = data["personalNote"].as<String>();
|
||||
|
||||
webadmin.active = data["webadmin"]["active"].as<bool>();
|
||||
webadmin.username = data["webadmin"]["username"].as<String>();
|
||||
webadmin.password = data["webadmin"]["password"].as<String>();
|
||||
|
||||
int stationMode = data["stationMode"].as<int>(); // deprecated but need to specify config version
|
||||
|
||||
if (stationMode == 0) {
|
||||
|
|
@ -362,6 +370,10 @@ void Configuration::init() {
|
|||
|
||||
personalNote = "";
|
||||
|
||||
webadmin.active = false;
|
||||
webadmin.username = "admin";
|
||||
webadmin.password = "";
|
||||
|
||||
Serial.println("All is Written!");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue