first test backupDigiMode

This commit is contained in:
richonguzman 2024-05-22 16:19:45 -04:00
parent 35fbd7a5dc
commit 5296b19ef2
8 changed files with 62 additions and 40 deletions

View file

@ -105,6 +105,8 @@ void Configuration::writeFile() {
data["other"]["lowPowerMode"] = lowPowerMode;
data["other"]["lowVoltageCutOff"] = lowVoltageCutOff;
data["other"]["backupDigiMode"] = backupDigiMode;
serializeJson(data, configFile);
configFile.close();
@ -174,6 +176,8 @@ bool Configuration::readFile() {
lowPowerMode = data["other"]["lowPowerMode"].as<bool>();
lowVoltageCutOff = data["other"]["lowVoltageCutOff"].as<double>();
backupDigiMode = data["other"]["backupDigiMode"].as<bool>();
int stationMode = data["stationMode"].as<int>(); // deprecated but need to specify config version
if (stationMode == 0) {
@ -354,7 +358,9 @@ void Configuration::init() {
lowPowerMode = false;
lowVoltageCutOff = 0;
Serial.println("todo escrito");
backupDigiMode = false;
Serial.println("All is Written!");
}
Configuration::Configuration() {