mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 13:46:37 +00:00
parent
345a514f7b
commit
5702fc5e26
@ -67,6 +67,7 @@ uint8_t hlw_ui_flag = 1;
|
|||||||
uint8_t hlw_model_type = 0;
|
uint8_t hlw_model_type = 0;
|
||||||
uint8_t hlw_load_off = 1;
|
uint8_t hlw_load_off = 1;
|
||||||
uint8_t hlw_cf1_timer = 0;
|
uint8_t hlw_cf1_timer = 0;
|
||||||
|
uint8_t hlw_power_retry = 0;
|
||||||
|
|
||||||
// Fix core 2.5.x ISR not in IRAM Exception
|
// Fix core 2.5.x ISR not in IRAM Exception
|
||||||
#ifndef USE_WS2812_DMA // Collides with Neopixelbus but solves exception
|
#ifndef USE_WS2812_DMA // Collides with Neopixelbus but solves exception
|
||||||
@ -126,8 +127,13 @@ void HlwEvery200ms(void)
|
|||||||
if (hlw_cf_power_pulse_length && energy_power_on && !hlw_load_off) {
|
if (hlw_cf_power_pulse_length && energy_power_on && !hlw_load_off) {
|
||||||
hlw_w = (hlw_power_ratio * Settings.energy_power_calibration) / hlw_cf_power_pulse_length; // W *10
|
hlw_w = (hlw_power_ratio * Settings.energy_power_calibration) / hlw_cf_power_pulse_length; // W *10
|
||||||
energy_active_power = (float)hlw_w / 10;
|
energy_active_power = (float)hlw_w / 10;
|
||||||
|
hlw_power_retry = 1; // Workaround issue #5161
|
||||||
} else {
|
} else {
|
||||||
energy_active_power = 0;
|
if (hlw_power_retry) {
|
||||||
|
hlw_power_retry--;
|
||||||
|
} else {
|
||||||
|
energy_active_power = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pin[GPIO_NRG_CF1] < 99) {
|
if (pin[GPIO_NRG_CF1] < 99) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user