Skip to content

Commit

Permalink
Fix Wifi instability when light is on, due to sleep=0 (arendst#6961, a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadinger committed Nov 20, 2019
1 parent 7777fa0 commit 62b2138
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions tasmota/_changelog.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Fix boot loop regression
* Add command TempOffset -12.6 .. 12.6 to set global temperature sensor offset (#6958)
* Fix check deepsleep for valid values in Settings (#6961)
* Fix Wifi instability when light is on, due to sleep=0 (#6961, #6608)
*
* 7.0.0.4 20191108
* Add command WifiPower 0 .. 20.5 to set Wifi Output Power which will be default set to 17dBm
Expand Down
1 change: 0 additions & 1 deletion tasmota/tasmota.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ const uint16_t PWM_MAX = 4000; // [PWM_MAX] Maximum frequency - Def
const uint16_t PWM_MIN = 100; // [PWM_MIN] Minimum frequency - Default: 100
// For Dimmers use double of your mains AC frequecy (100 for 50Hz and 120 for 60Hz)
// For Controlling Servos use 50 and also set PWM_FREQ as 50 (DO NOT USE THESE VALUES FOR DIMMERS)
//#define PWM_LIGHTSCHEME0_IGNORE_SLEEP // Do not change sleep value for LightAnimate() scheme 0

const uint16_t MAX_POWER_HOLD = 10; // Time in SECONDS to allow max agreed power
const uint16_t MAX_POWER_WINDOW = 30; // Time in SECONDS to disable allow max agreed power
Expand Down
10 changes: 5 additions & 5 deletions tasmota/xdrv_04_light.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1617,11 +1617,11 @@ void LightAnimate(void)
}
}
else {
#ifdef PWM_LIGHTSCHEME0_IGNORE_SLEEP
sleep = (LS_POWER == Settings.light_scheme) ? Settings.sleep : 0; // If no animation then use sleep as is
#else
sleep = 0;
#endif // PWM_LIGHTSCHEME0_IGNORE_SLEEP
if (Settings.sleep > 50) {
sleep = 50; // set a minimal value of 50 milliseconds to ensure that animations are smooth
} else {
sleep = Settings.sleep; // or keep the current sleep if it's lower than 50
}
switch (Settings.light_scheme) {
case LS_POWER:
light_controller.calcLevels();
Expand Down

0 comments on commit 62b2138

Please sign in to comment.