|
FastLED 3.9.15
|
Real FastLED implementation adapter.
This class adapts the global FastLED singleton to the IFastLED interface. It provides a thin wrapper that delegates all operations to the global FastLED object while optionally managing segment control for specific LED controller indices.
This adapter allows WLED and other integrations to work with FastLED through a standard interface while maintaining full compatibility with the existing FastLED API.
Example usage:
#include <adapter.h>
Inheritance diagram for fl::FastLEDAdapter:
Collaboration diagram for fl::FastLEDAdapter:Public Member Functions | |
| FastLEDAdapter (u8 controllerIndex=0) | |
| Construct adapter wrapping the global FastLED object. | |
| ~FastLEDAdapter () FL_NOEXCEPT override=default | |
| Destructor. | |
| void | clear (bool writeToStrip=false) override |
| Clear all LEDs (set to black) | |
| void | clearSegment () override |
| Clear the segment range (operate on full LED array) | |
| void | delay (unsigned long ms) override |
| Delay for a specified number of milliseconds. | |
| u8 | getBrightness () const override |
| Get the current global brightness. | |
| fl::span< CRGB > | getLEDs () override |
| Get the LED array as a span. | |
| u16 | getMaxRefreshRate () const override |
| Get the maximum refresh rate. | |
| size_t | getNumLEDs () const override |
| Get the number of LEDs. | |
| void | setBrightness (u8 brightness) override |
| Set the global brightness. | |
| void | setCorrection (CRGB correction) override |
| Set color correction. | |
| void | setMaxRefreshRate (u16 fps) override |
| Set the maximum refresh rate. | |
| void | setSegment (size_t start, size_t end) override |
| Set a segment range for subsequent operations. | |
| void | setTemperature (CRGB temperature) override |
| Set color temperature. | |
| void | show () override |
| Send the LED data to the strip Uses the current brightness setting. | |
| void | show (u8 brightness) override |
| Send the LED data to the strip with a specific brightness. | |
Public Member Functions inherited from fl::IFastLED | |
| virtual | ~IFastLED () FL_NOEXCEPT=default |
Private Attributes | |
| u8 | mControllerIndex |
| bool | mHasSegment |
| size_t | mSegmentEnd |
| size_t | mSegmentStart |