FastLED 3.10.8
Loading...
Searching...
No Matches

◆ emitter_power_weights()

static void emitter_power_weights ( fl::u8 count,
fl::u8(&) weights[5] )
static

Definition at line 88 of file power_mgt.cpp.hpp.

88 {
89 const PowerModelRGB& rgb = gPowerModel();
90 weights[0] = rgb.red_mW;
91 weights[1] = rgb.green_mW;
92 weights[2] = rgb.blue_mW;
93 weights[3] = 0;
94 weights[4] = 0;
95 if (count == 4) {
96 const fl::u8 white = gWhiteEmitterPower().mW;
97 weights[3] = white != 0 ? white : 255;
98 } else if (count == 5) {
100 if (rgbww.declared) {
101 weights[0] = rgbww.model.red_mW;
102 weights[1] = rgbww.model.green_mW;
103 weights[2] = rgbww.model.blue_mW;
104 weights[3] = rgbww.model.warm_white_mW;
105 weights[4] = rgbww.model.white_mW;
106 } else {
107 weights[3] = 255;
108 weights[4] = 255;
109 }
110 }
111}
unsigned char u8
Definition stdint.h:131
static PowerModelRGB & gPowerModel() FL_NO_EXCEPT
Global RGB power model (initialized to WS2812 @ 5V defaults, linear response)
static RgbwwEmitterPower & gRgbwwEmitterPower() FL_NO_EXCEPT
static WhiteEmitterPower & gWhiteEmitterPower() FL_NO_EXCEPT
PowerModelRGBWW model
fl::u8 blue_mW
Blue channel power at full brightness (255), in milliwatts.
Definition power_mgt.h:33
fl::u8 red_mW
Red channel power at full brightness (255), in milliwatts.
Definition power_mgt.h:31
fl::u8 green_mW
Green channel power at full brightness (255), in milliwatts.
Definition power_mgt.h:32
RGB LED power consumption model Used for standard 3-channel LEDs (WS2812, WS2812B,...
Definition power_mgt.h:30
fl::u8 white_mW
Cool white channel power at full brightness (255), in milliwatts.
Definition power_mgt.h:103
fl::u8 green_mW
Green channel power at full brightness (255), in milliwatts.
Definition power_mgt.h:101
fl::u8 warm_white_mW
Warm white channel power at full brightness (255), in milliwatts.
Definition power_mgt.h:104
fl::u8 red_mW
Red channel power at full brightness (255), in milliwatts.
Definition power_mgt.h:100
fl::u8 blue_mW
Blue channel power at full brightness (255), in milliwatts.
Definition power_mgt.h:102

References PowerModelRGB::blue_mW, PowerModelRGBWW::blue_mW, RgbwwEmitterPower::declared, FL_NO_EXCEPT, gPowerModel(), PowerModelRGB::green_mW, PowerModelRGBWW::green_mW, gRgbwwEmitterPower(), gWhiteEmitterPower(), RgbwwEmitterPower::model, WhiteEmitterPower::mW, PowerModelRGB::red_mW, PowerModelRGBWW::red_mW, PowerModelRGBWW::warm_white_mW, and PowerModelRGBWW::white_mW.

Referenced by calculate_unscaled_emitter_power_mW(), and controller_dither_reserve_mW().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: