FastLED 3.10.10
Loading...
Searching...
No Matches

◆ set_power_model() [1/3]

void set_power_model ( const PowerModelRGB & model)

Set custom RGB LED power consumption model.

Parameters
modelRGB power consumption model. The model's exponent field drives the brightness-to-power response curve used by estimation and limiting; pass PowerModelRGB(r, g, b, d, e) to set channel weights + response curve in a single call.
Note
exponent <= 0 or values within 1e-4 of 1.0 fall back to linear (identity tables) rather than rebuilding with a degenerate curve.

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

1008 {
1009 apply_rgb_power_model(model);
1010 // An RGB model describes a strip with three emitters. Leaving a white
1011 // declaration from an earlier RGBW model standing would charge this one
1012 // for a diode the caller just said it does not have.
1013 gWhiteEmitterPower().mW = 0;
1014 gRgbwwEmitterPower().declared = false;
1015}
static void apply_rgb_power_model(const PowerModelRGB &model) FL_NO_EXCEPT
static RgbwwEmitterPower & gRgbwwEmitterPower() FL_NO_EXCEPT
static WhiteEmitterPower & gWhiteEmitterPower() FL_NO_EXCEPT

References apply_rgb_power_model(), RgbwwEmitterPower::declared, FL_NO_EXCEPT, gRgbwwEmitterPower(), gWhiteEmitterPower(), and WhiteEmitterPower::mW.

Referenced by CFastLED::setPowerModel(), CFastLED::setPowerModel(), and CFastLED::setPowerModel().

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