removing deactivated code

This commit is contained in:
Frank
2025-11-01 13:30:51 +01:00
parent 1f99aeb506
commit 96c3244318

View File

@@ -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,