Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'power_mgt.h')
-rw-r--r--power_mgt.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/power_mgt.h b/power_mgt.h
index 5d0ec61c..1720befa 100644
--- a/power_mgt.h
+++ b/power_mgt.h
@@ -58,6 +58,22 @@ void delay_at_max_brightness_for_power( uint16_t ms);
uint32_t calculate_unscaled_power_mW( const CRGB* ledbuffer, uint16_t numLeds);
/// calculate_max_brightness_for_power_mW tells you the highest brightness
+/// level you can use and still stay under the specified power budget for
+/// a given set of leds. It takes a pointer to an array of CRGB objects, a
+/// count, a 'target brightness' which is the brightness you'd ideally like
+/// to use, and the max power draw desired in milliwatts. The result from
+/// this function will be no higher than the target_brightess you supply, but may be lower.
+uint8_t calculate_max_brightness_for_power_mW(const CRGB* ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_mW);
+
+/// calculate_max_brightness_for_power_mW tells you the highest brightness
+/// level you can use and still stay under the specified power budget for
+/// a given set of leds. It takes a pointer to an array of CRGB objects, a
+/// count, a 'target brightness' which is the brightness you'd ideally like
+/// to use, and the max power in volts and milliamps. The result from this
+/// function will be no higher than the target_brightess you supply, but may be lower.
+uint8_t calculate_max_brightness_for_power_vmA(const CRGB* ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_V, uint32_t max_power_mA);
+
+/// calculate_max_brightness_for_power_mW tells you the highest brightness
/// level you can use and still stay under the specified power budget. It
/// takes a 'target brightness' which is the brightness you'd ideally like
/// to use. The result from this function will be no higher than the