mirror of https://github.com/arendst/Tasmota.git
Fix invalid ADC energy reset
This commit is contained in:
parent
3473c3c1b0
commit
4f035d18f6
|
@ -687,6 +687,7 @@ void AdcEverySecond(void) {
|
||||||
uint32_t voltage_phase = (voltage_count == current_count) ? phase : 0;
|
uint32_t voltage_phase = (voltage_count == current_count) ? phase : 0;
|
||||||
Energy->active_power[phase] = Energy->voltage[voltage_phase] * Energy->current[phase]; // Watt
|
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->kWhtoday_delta[phase] += (uint32_t)(Energy->active_power[phase] * 1000) / 36; // deca_microWh
|
||||||
|
Energy->data_valid[phase] = 0;
|
||||||
}
|
}
|
||||||
EnergyUpdateToday();
|
EnergyUpdateToday();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue