mirror of
https://github.com/wled/WLED.git
synced 2025-07-09 11:56:35 +00:00
commit
d18f078b1e
@ -505,7 +505,7 @@ void BusPwm::show() {
|
|||||||
uint8_t numPins = NUM_PWM_PINS(_type);
|
uint8_t numPins = NUM_PWM_PINS(_type);
|
||||||
unsigned maxBri = (1<<_depth) - 1;
|
unsigned maxBri = (1<<_depth) - 1;
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
unsigned pwmBri = (unsigned)(roundf(powf((float)_bri / 255.0f, 1.7f) * (float)maxBri + 0.5f)); // using gamma 1.7 to extrapolate PWM duty cycle
|
unsigned pwmBri = (unsigned)(roundf(powf((float)_bri / 255.0f, 1.7f) * (float)maxBri)); // using gamma 1.7 to extrapolate PWM duty cycle
|
||||||
#else
|
#else
|
||||||
unsigned pwmBri = cieLUT[_bri] >> (12 - _depth); // use CIE LUT
|
unsigned pwmBri = cieLUT[_bri] >> (12 - _depth); // use CIE LUT
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user