Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Wifi instability when light is on, due to sleep=0 (#6961, #6608) #6980

Merged
merged 2 commits into from
Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 > 10) {
sleep = 10; // 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