Merge pull request #10756 from ascillato/patch-3

In case of lost comms with PZEM, avoid losing Today Energy
This commit is contained in:
Theo Arends 2021-01-30 08:44:55 +01:00 committed by GitHub
commit 3b425e9f23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -530,7 +530,7 @@ void EnergyEverySecond(void)
} }
} }
if (!data_valid) { if (!data_valid) {
Energy.start_energy = 0; //Energy.start_energy = 0;
AddLog(LOG_LEVEL_DEBUG, PSTR("NRG: Energy reset by " STR(ENERGY_WATCHDOG) " seconds invalid data")); AddLog(LOG_LEVEL_DEBUG, PSTR("NRG: Energy reset by " STR(ENERGY_WATCHDOG) " seconds invalid data"));
XnrgCall(FUNC_ENERGY_RESET); XnrgCall(FUNC_ENERGY_RESET);