From 96c32443187152b106ed51224c3a98ca7f60ded8 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sat, 1 Nov 2025 13:30:51 +0100 Subject: [PATCH] removing deactivated code --- wled00/colors.cpp | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/wled00/colors.cpp b/wled00/colors.cpp index 36cb1b4b..336a8e22 100644 --- a/wled00/colors.cpp +++ b/wled00/colors.cpp @@ -320,25 +320,9 @@ static float maxf (float v, float w) // WLEDMM better use standard library fmax } #endif -// adjust RGB values based on color temperature in K (range [2800-10200]) (https://en.wikipedia.org/wiki/Color_balance) -// called from bus manager when color correction is enabled! -#if 0 -// WLEDMM moved into bus_manager.cpp for better optimization -uint32_t __attribute__((hot)) IRAM_ATTR_YN colorBalanceFromKelvin(uint16_t kelvin, uint32_t rgb) // WLEDMM: IRAM_ATTR_YN -{ - //remember so that slow colorKtoRGB() doesn't have to run for every setPixelColor() - static byte correctionRGB[4] = {0,0,0,0}; - static uint16_t lastKelvin = 0; - if (lastKelvin != kelvin) colorKtoRGB(kelvin, correctionRGB); // convert Kelvin to RGB - lastKelvin = kelvin; - byte rgbw[4]; - rgbw[0] = ((uint16_t) correctionRGB[0] * R(rgb)) /255; // correct R - rgbw[1] = ((uint16_t) correctionRGB[1] * G(rgb)) /255; // correct G - rgbw[2] = ((uint16_t) correctionRGB[2] * B(rgb)) /255; // correct B - rgbw[3] = W(rgb); - return RGBW32(rgbw[0],rgbw[1],rgbw[2],rgbw[3]); -} -#endif + +// WLEDMM colorBalanceFromKelvin moved into bus_manager.cpp for better optimization + //approximates a Kelvin color temperature from an RGB color. //this does no check for the "whiteness" of the color,