Merge branch 'development' into so68_autopower

This commit is contained in:
Theo Arends 2019-11-28 21:33:20 +01:00 committed by GitHub
commit 1e8c020422
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@
- Fix Arduino IDE function prototyping compile error (#6982) - Fix Arduino IDE function prototyping compile error (#6982)
- Change update lib IRremoteESP8266 updated to v2.7.1, -2.7k flash and -1.5k RAM for Tasmota-IR - Change update lib IRremoteESP8266 updated to v2.7.1, -2.7k flash and -1.5k RAM for Tasmota-IR
- Fix auto--power on/off when setting channel to non-zero or zero value, when SetOption68 1 - Fix auto--power on/off when setting channel to non-zero or zero value, when SetOption68 1
- Fix postpone saving settings to flash until Fade is complete, avoids pause in Fade
### 7.0.0.5 20191118 ### 7.0.0.5 20191118

View File

@ -1792,6 +1792,12 @@ void LightApplyFade(void) {
// Note: Settings.light_speed is the number of half-seconds for a 100% fade, // Note: Settings.light_speed is the number of half-seconds for a 100% fade,
// i.e. light_speed=1 means 1024 steps in 10 ticks (500ms) // i.e. light_speed=1 means 1024 steps in 10 ticks (500ms)
Light.fade_duration = (distance * Settings.light_speed * 10) / 1024; Light.fade_duration = (distance * Settings.light_speed * 10) / 1024;
// Also postpone the save_data for the duration of the Fade (in seconds)
uint32_t delay_seconds = 1 + (Light.fade_duration + 19) / 20; // add one more second
// AddLog_P2(LOG_LEVEL_INFO, PSTR("delay_seconds %d, save_data_counter %d"), delay_seconds, save_data_counter);
if (save_data_counter < delay_seconds) {
save_data_counter = delay_seconds; // pospone
}
} else { } else {
// no fade needed, we keep the duration at zero, it will fallback directly to end of fade // no fade needed, we keep the duration at zero, it will fallback directly to end of fade
} }