From 9d15f7ad9b78d73a4cda2f7150cd5abe6f2867b8 Mon Sep 17 00:00:00 2001 From: Andrey Klimov Date: Thu, 7 May 2020 01:12:01 +0300 Subject: [PATCH] RGB bright fix --- lighthub/item.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lighthub/item.cpp b/lighthub/item.cpp index 406dfbc..c35c9bc 100644 --- a/lighthub/item.cpp +++ b/lighthub/item.cpp @@ -1005,7 +1005,7 @@ int Item::Ctrl(short cmd, short n, int *Parameters, boolean send, int suffixCode //Vebler-Heffler law // float x = Par[2]/25.-3.; // int rgbValue = round(exp(x)/(exp(1)/255)); - int rgbValue = getBright(Par[1]); + int rgbValue = getBright(Par[2]); switch (itemType) { @@ -1739,7 +1739,7 @@ switch (cause) sendDelayedStatus(); return INTERVAL_CHECK_MODBUS; break; - #endif + #endif /* case CH_RGB: //All channels with slider generate too many updates case CH_RGBW: case CH_DIMMER: