mirror of https://github.com/arendst/Tasmota.git
Fix light wakeup exception 0
Fix light wakeup exception 0 (divide by zero) when ``WakeupDuration`` is not initialised (#9466)
This commit is contained in:
parent
577f9a69f6
commit
1f49daacd3
|
@ -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 ledlink blink when no network connected regression from 8.3.1.4 (#9292)
|
||||||
- Fix exception 28 due to device group buffer overflow (#9459)
|
- Fix exception 28 due to device group buffer overflow (#9459)
|
||||||
- Fix shutter timing problem due to buffer overflow in calibration matrix (#9458)
|
- 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 Mitsubishi Electric HVAC by David Gwynne (#9237)
|
||||||
- Add optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353)
|
- 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)
|
- Add SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124)
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
- Fix ledlink blink when no network connected regression from 8.3.1.4 (#9292)
|
- 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 exception 28 due to device group buffer overflow (#9459)
|
||||||
- Fix shutter timing problem due to buffer overflow in calibration matrix (#9458)
|
- 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 Mitsubishi Electric HVAC by David Gwynne (#9237)
|
||||||
- Add optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353)
|
- 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)
|
- Add SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124)
|
||||||
|
|
|
@ -278,7 +278,7 @@ struct LIGHT {
|
||||||
uint8_t fixed_color_index = 1;
|
uint8_t fixed_color_index = 1;
|
||||||
uint8_t pwm_offset = 0; // Offset in color buffer
|
uint8_t pwm_offset = 0; // Offset in color buffer
|
||||||
uint8_t max_scheme = LS_MAX -1;
|
uint8_t max_scheme = LS_MAX -1;
|
||||||
|
|
||||||
uint32_t wakeup_start_time = 0;
|
uint32_t wakeup_start_time = 0;
|
||||||
|
|
||||||
bool update = true;
|
bool update = true;
|
||||||
|
@ -1395,6 +1395,9 @@ void LightInit(void)
|
||||||
Light.power = 0;
|
Light.power = 0;
|
||||||
Light.update = true;
|
Light.update = true;
|
||||||
Light.wakeup_active = 0;
|
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) {
|
if (Settings.flag4.fade_at_startup) {
|
||||||
Light.fade_initialized = true; // consider fade intialized starting from black
|
Light.fade_initialized = true; // consider fade intialized starting from black
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue