mirror of https://github.com/arendst/Tasmota.git
Fix random crash in Zigbee main page (#20481)
This commit is contained in:
parent
08a14ccc9e
commit
c1f3561a3e
|
@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file.
|
|||
- Scripter memory leak in `>w x` (#20473)
|
||||
- ESP8266 GPIO Viewer exception 9 on reading Analog GPIO
|
||||
- GPIO Viewer single instance
|
||||
- Fix random crash in Zigbee main page
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
@ -2335,8 +2335,11 @@ void ZigbeeShow(bool json)
|
|||
WSContentSend_P(PSTR(" 🔅 %d%%"), changeUIntScale(light.getDimmer(),0,254,0,100));
|
||||
}
|
||||
if (light.validCT() && ((channels == 2) || (channels == 5))) {
|
||||
uint32_t ct_k = (((1000000 / light.getCT()) + 25) / 50) * 50;
|
||||
WSContentSend_P(msg[ZB_WEB_LIGHT_CT], light.getCT(), ct_k);
|
||||
uint16_t ct = light.getCT();
|
||||
if (ct != 0) { // ct == 0 means undefined value
|
||||
uint32_t ct_k = (((1000000 / ct) + 25) / 50) * 50;
|
||||
WSContentSend_P(msg[ZB_WEB_LIGHT_CT], light.getCT(), ct_k);
|
||||
}
|
||||
}
|
||||
if (light.validHue() && light.validSat() && (channels >= 3)) {
|
||||
uint8_t r,g,b;
|
||||
|
|
Loading…
Reference in New Issue