FastLED 3.9.15
Loading...
Searching...
No Matches

◆ scale_power_for_brightness()

fl::u32 scale_power_for_brightness ( fl::u32 total_mW,
fl::u8 brightness )

Applies the configured power-scaling response to a total power value.

Parameters
total_mWunscaled total power at full brightness
brightnessrequested brightness in FastLED's 0-255 brightness space
Returns
estimated power after applying the configured brightness-to-power response

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

126 {
127 return fl::scale32by8(total_mW, map_power_value(brightness));
128}
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
static fl::u8 map_power_value(fl::u8 brightness)

References brightness, and map_power_value().

Referenced by calculate_max_brightness_for_power_mW(), calculate_max_brightness_for_power_mW(), and CFastLED::getEstimatedPowerInMilliWatts().

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