From 3446b0b78cb86149746c60a0f06648f99070bfa8 Mon Sep 17 00:00:00 2001 From: stefanbode Date: Sun, 27 Nov 2022 17:14:51 +0100 Subject: [PATCH] bugfix --- .../xdrv_04_light_utils.ino | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino b/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino index 11c8359ba..e6254b1f8 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino @@ -32,15 +32,15 @@ typedef struct gamma_table_t { } gamma_table_t; const gamma_table_t ac_dimmer_table[] = { // don't put in PROGMEM for performance reasons - { 0, 0 }, - { 1, 64 }, - { 5, 144 }, - { 10, 205 }, - { 50, 500 }, - { 90, 795 }, - { 95, 866 }, - { 99, 936 }, - { 100, 1000 }, + { 0, 0 }, + { 10, 64 }, + { 50, 144 }, + { 100, 205 }, + { 500, 500 }, + { 900, 795 }, + { 950, 866 }, + { 990, 936 }, + { 1024, 1024 }, { 0xFFFF, 0xFFFF } // fail-safe if out of range }; @@ -333,7 +333,7 @@ uint16_t ledGammaReverse_internal(uint16_t vg, const struct gamma_table_t *gt_pt // 10 bits power select to 10 bits timing based on sinus curve uint16_t ac_zero_cross_power(uint16_t v) { - return ledGamma_internal(v, ac_dimmer_table)/10; + return ledGamma_internal(v, ac_dimmer_table); } // 10 bits in, 10 bits out