mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-10 18:31:01 +00:00
Clear debug config on setup if not already set
This commit is contained in:
@@ -220,6 +220,7 @@ bool AmsConfiguration::getDebugConfig(DebugConfig& config) {
|
||||
EEPROM.end();
|
||||
return true;
|
||||
} else {
|
||||
clearDebug(config);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -232,6 +233,12 @@ bool AmsConfiguration::setDebugConfig(DebugConfig& config) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
void AmsConfiguration::clearDebug(DebugConfig& config) {
|
||||
config.level = 5;
|
||||
config.telnet = false;
|
||||
config.serial = false;
|
||||
}
|
||||
|
||||
bool AmsConfiguration::getDomoticzConfig(DomoticzConfig& config) {
|
||||
if(hasConfig()) {
|
||||
EEPROM.begin(EEPROM_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user