From 29d04b3fbbe3c3f51187c6bdd85d1099153fddaf Mon Sep 17 00:00:00 2001 From: ctonhaeu Date: Tue, 24 Jan 2017 13:20:44 +0100 Subject: [PATCH] + Fixed RGBWWCW Mode (RGBWWLedColor.cpp) --- RGBWWLedColor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RGBWWLedColor.cpp b/RGBWWLedColor.cpp index cbdc5c4..68208b2 100644 --- a/RGBWWLedColor.cpp +++ b/RGBWWLedColor.cpp @@ -156,7 +156,7 @@ void RGBWWColorUtils::getHSVcorrection(float& red, float& yellow, float& green, int wwfactor = ((_ColdWhiteKelvin - rgbw.ct) * RGBWW_CALC_MAXVAL) / (_ColdWhiteKelvin - _WarmWhiteKelvin); //balance between CW and WW Leds output.warmwhite = (rgbw.w * wwfactor) /RGBWW_CALC_MAXVAL; - output.coldwhite = (rgbw.w * (1 - wwfactor)) / RGBWW_CALC_MAXVAL; + output.coldwhite = rgbw.w - output.warmwhite; } else { // if kelvin outside range - different calculation algorithm // for now we asume a "neutral white" (0.5 CW, 0.5 WW)