Get estimated power consumption in milliwatts.
Calculates the estimated power consumption based on current LED buffer contents, brightness setting, and configured power model. This provides visibility into power usage for monitoring and debugging.
578 {
579#if FL_COLOR_PIPELINE_SHARED
580 if (apply_limiter &&
mPPowerFunc && fl::activeFramePowerDispatch()) {
581 bool managed = false;
583 if (p->getEnabled() && fl::channelColorPipeline(*p)) {
584 managed = true;
585 break;
586 }
587 }
588 if (managed) {
589 const fl::FramePowerPlan plan =
592 const fl::u32 mcu_mW = plan.
mcu_mW;
594 }
595 }
596#endif
598 fl::u32 controllable_power_mW = 0;
599 fl::u32 dither_reserve_power_mW = 0;
600
601
602
603
607
608
609
611 const fl::u32 dark_mW = dark_mW_per_led *
static_cast<fl::u32
>(
leds.size());
613 controllable_power_mW += unscaled_mW > dark_mW ? unscaled_mW - dark_mW : 0;
614
615
616
617#if !FL_PLATFORM_HAS_TINY_MEMORY
619#endif
620 }
621 });
622
623
625
627
628
630 }
631
632
633
634
635
636
637
638 if (effective_brightness != 0) {
640 }
643}
CLEDController * controller
power_func mPPowerFunc
function for overriding brightness when using FastLED.show();
fl::u8 mScale
the current global brightness scale setting
CRGB * leds() FL_NO_EXCEPT
Get a pointer to led data for the first controller.
fl::u32 mNPowerData
max power use parameter
static void visitControllers(Visitor &&visitor) FL_NO_EXCEPT
Visit all controllers in the linked list with a visitor The visitor must be a callable that accepts (...
static CLEDController * head() FL_NO_EXCEPT
Get the first LED controller in the linked list of controllers.
fl::CLEDController CLEDController
fl::u32 scale_power_for_brightness(fl::u32 total_mW, fl::u8 brightness) FL_NO_EXCEPT
Applies the configured power-scaling response to a total power value.
fl::u32 controller_dither_reserve_mW(const fl::CLEDController &controller) FL_NO_EXCEPT
dither_reserve_mW() for a controller that dithers, and zero for one that does not: a mode other than ...
fl::u32 controller_unscaled_power_mW(const fl::CLEDController &controller) FL_NO_EXCEPT
One controller's demand at full brightness, in mW, including idle draw – the quantity the limiter sum...
PowerModelRGB get_power_model() FL_NO_EXCEPT
Get current RGB power model.
static fl::u32 fixed_power_mW(fl::u32 led_count) FL_NO_EXCEPT
fl::u8 dark_mW
Dark (all channels off) draw per LED IC, in milliwatts, charged as an undimmable baseline.