Reclaiming some heap space

This commit is contained in:
Gunnar Skjold
2022-10-19 19:54:26 +02:00
parent 39b68aca51
commit ade12199b9
6 changed files with 622 additions and 628 deletions

View File

@@ -510,6 +510,7 @@ bool AmsConfiguration::getEnergyAccountingConfig(EnergyAccountingConfig& config)
if(config.thresholds[9] != 255) {
clearEnergyAccountingConfig(config);
}
if(config.hours > 5) config.hours = 5;
return true;
} else {
return false;
@@ -549,6 +550,7 @@ void AmsConfiguration::clearEnergyAccountingConfig(EnergyAccountingConfig& confi
config.thresholds[7] = 100;
config.thresholds[8] = 150;
config.thresholds[9] = 255;
config.hours = 3;
}
bool AmsConfiguration::isEnergyAccountingChanged() {