mirror of
https://github.com/arendst/Tasmota.git
synced 2025-08-06 17:37:44 +00:00
Clean up code and functionality
Clean up code and functionality
This commit is contained in:
parent
c54bcf4b9a
commit
866c9c4b1f
@ -240,7 +240,7 @@ void HlwDrvInit(void)
|
|||||||
hlw_model_type = 1; // HJL-01/BL0937
|
hlw_model_type = 1; // HJL-01/BL0937
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pin[GPIO_HLW_CF] < 99) { // HLW8012 or HJL-01 based device
|
if (pin[GPIO_HLW_CF] < 99) { // HLW8012 or HJL-01 based device Power monitor
|
||||||
|
|
||||||
hlw_ui_flag = 1; // Voltage on high
|
hlw_ui_flag = 1; // Voltage on high
|
||||||
if (pin[GPIO_NRG_SEL_INV] < 99) {
|
if (pin[GPIO_NRG_SEL_INV] < 99) {
|
||||||
@ -249,10 +249,11 @@ void HlwDrvInit(void)
|
|||||||
hlw_ui_flag = 0; // Voltage on low
|
hlw_ui_flag = 0; // Voltage on low
|
||||||
}
|
}
|
||||||
|
|
||||||
if (99 == pin[GPIO_NRG_SEL]) {
|
if (pin[GPIO_NRG_CF1] < 99) { // Voltage and/or Current monitor
|
||||||
energy_current_available = false;
|
if (99 == pin[GPIO_NRG_SEL]) { // Voltage and/or Current selector
|
||||||
|
energy_current_available = false; // Assume Voltage
|
||||||
}
|
}
|
||||||
if (99 == pin[GPIO_NRG_CF1]) {
|
} else {
|
||||||
energy_current_available = false;
|
energy_current_available = false;
|
||||||
energy_voltage_available = false;
|
energy_voltage_available = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user