Skip to content

Commit

Permalink
Fix light wakeup exception 0
Browse files Browse the repository at this point in the history
Fix light wakeup exception 0 (divide by zero) when ``WakeupDuration`` is not initialised (#9466)
  • Loading branch information
arendst committed Oct 5, 2020
1 parent 577f9a6 commit 1f49daa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions tasmota/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion tasmota/xdrv_04_light.ino
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ struct LIGHT {
uint8_t fixed_color_index = 1;
uint8_t pwm_offset = 0; // Offset in color buffer
uint8_t max_scheme = LS_MAX -1;

uint32_t wakeup_start_time = 0;

bool update = true;
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 1f49daa

Please sign in to comment.