From 08f20b94047fd91d830081c3a858728c46c0ce92 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Tue, 1 Apr 2025 22:51:56 +0200 Subject: [PATCH] Smoothen light gamma curve when using `Fade` (#23230) --- CHANGELOG.md | 1 + tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 073ed5819..c367d355b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. ### Changed - Output of commands `GPIO` and `GPIOs` swapped +- Smoothen light gamma curve when using `Fade` ### Fixed - INA226 driver fixes (#23197) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino b/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino index 0e214b977..eb702d500 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino @@ -59,9 +59,13 @@ const gamma_table_t gamma_table[] = { // don't put in PROGMEM for performance // simplified Gamma table for Fade, cheating a little at low brightness const gamma_table_t gamma_table_fast[] = { - { 384, 192 }, - { 768, 576 }, - { 1023, 1023 }, + { 1, 1 }, + { 312, 58 }, + { 457, 106 }, + { 626, 261 }, + { 762, 450 }, + { 895, 703 }, + { 1023, 1023 }, { 0xFFFF, 0xFFFF } // fail-safe if out of range };