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

◆ calculate_max_brightness_for_power_vmA()

fl::u8 calculate_max_brightness_for_power_vmA ( const CRGB * ledbuffer,
fl::u16 numLeds,
fl::u8 target_brightness,
fl::u32 max_power_V,
fl::u32 max_power_mA )

Determines the highest brightness level you can use and still stay under the specified power budget for a given set of LEDs.

Parameters
ledbufferthe LED data to check
numLedsthe number of LEDs in the data array
target_brightnessthe brightness you'd ideally like to use
max_power_Vthe max power in volts
max_power_mAthe max power in milliamps
Returns
a limited brightness value. No higher than the target brightness, but may be lower depending on the power limit.

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

188 {
189 return calculate_max_brightness_for_power_mW(ledbuffer, numLeds, target_brightness, max_power_V * max_power_mA);
190}
fl::u8 calculate_max_brightness_for_power_mW(const CRGB *ledbuffer, fl::u16 numLeds, fl::u8 target_brightness, fl::u32 max_power_mW)
Determines the highest brightness level you can use and still stay under the specified power budget f...

References calculate_max_brightness_for_power_mW().

+ Here is the call graph for this function: