Fix light wakeup exception 0

Fix light wakeup exception 0 (divide by zero) when ``WakeupDuration`` is not initialised (#9466)
This commit is contained in:
Theo Arends 2020-10-05 15:16:43 +02:00
parent 577f9a69f6
commit 1f49daacd3
3 changed files with 6 additions and 1 deletions

View File

@ -72,6 +72,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
- Fix ledlink blink when no network connected regression from 8.3.1.4 (#9292)
- Fix exception 28 due to device group buffer overflow (#9459)
- Fix shutter timing problem due to buffer overflow in calibration matrix (#9458)
- Fix light wakeup exception 0 (divide by zero) when ``WakeupDuration`` is not initialised (#9466)
- Add optional support for Mitsubishi Electric HVAC by David Gwynne (#9237)
- Add optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353)
- Add SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124)

View File

@ -13,6 +13,7 @@
- Fix ledlink blink when no network connected regression from 8.3.1.4 (#9292)
- Fix exception 28 due to device group buffer overflow (#9459)
- Fix shutter timing problem due to buffer overflow in calibration matrix (#9458)
- Fix light wakeup exception 0 (divide by zero) when ``WakeupDuration`` is not initialised (#9466)
- Add optional support for Mitsubishi Electric HVAC by David Gwynne (#9237)
- Add optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353)
- Add SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124)

View File

@ -1395,6 +1395,9 @@ void LightInit(void)
Light.power = 0;
Light.update = true;
Light.wakeup_active = 0;
if (0 == Settings.light_wakeup) {
Settings.light_wakeup = 60; // Fix divide by zero exception 0 in Animate
}
if (Settings.flag4.fade_at_startup) {
Light.fade_initialized = true; // consider fade intialized starting from black
}