Merge pull request #5264 from andrethomas/scheme0_sleep

Disable sleep for scheme 0
This commit is contained in:
Theo Arends 2019-02-18 10:14:09 +01:00 committed by GitHub
commit 2f8cd65ac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -104,6 +104,7 @@ typedef unsigned long power_t; // Power (Relay) type
#define 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
#define DEFAULT_POWER_DELTA 80 // Power change percentage
#define MAX_POWER_HOLD 10 // Time in SECONDS to allow max agreed power

View File

@ -896,7 +896,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
switch (Settings.light_scheme) {
case LS_POWER:
LightSetDimmer(Settings.light_dimmer);