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

Fade would fail when the difference between start and target would be too small #19246

Merged
merged 1 commit into from
Aug 2, 2023
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- Initial battery level percentage (#19160)
- Berry SK6812_GRBW crash (#19166)
- Fade would fail when the difference between start and target would be too small

### Removed

Expand Down
2 changes: 1 addition & 1 deletion tasmota/tasmota_xdrv_driver/xdrv_04_light.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@ bool LightApplyFade(void) { // did the value chanegd and needs to be applied
Light.fade_duration = LightGetSpeedSetting() * 500;
Light.speed_once_enabled = false; // The once off speed value has been read, reset it
if (!Settings->flag5.fade_fixed_duration) {
Light.fade_duration = (distance * Light.fade_duration) / 1023; // time is proportional to distance, except with SO117
Light.fade_duration = (distance * Light.fade_duration) / 1023 + 1 /* make sure value is not zero */; // time is proportional to distance, except with SO117
}
if (Settings->save_data) {
// Also postpone the save_data for the duration of the Fade (in seconds)
Expand Down