Fix invalid ADC energy reset

This commit is contained in:
Theo Arends 2024-08-04 18:06:24 +02:00
parent 3473c3c1b0
commit 4f035d18f6
1 changed files with 1 additions and 0 deletions

View File

@ -687,6 +687,7 @@ void AdcEverySecond(void) {
uint32_t voltage_phase = (voltage_count == current_count) ? phase : 0;
Energy->active_power[phase] = Energy->voltage[voltage_phase] * Energy->current[phase]; // Watt
Energy->kWhtoday_delta[phase] += (uint32_t)(Energy->active_power[phase] * 1000) / 36; // deca_microWh
Energy->data_valid[phase] = 0;
}
EnergyUpdateToday();
}