|
FastLED 3.10.8
|
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) FL_NO_EXCEPT | |
| Construct adapter wrapping the global FastLED object. | |
| ~FastLEDAdapter () FL_NO_EXCEPT override=default | |
| Destructor. | |
| void | clear (bool writeToStrip=false) FL_NO_EXCEPT override |
| Clear all LEDs (set to black) | |
| void | clearSegment () FL_NO_EXCEPT override |
| Clear the segment range (operate on full LED array) | |
| void | delay (unsigned long ms) FL_NO_EXCEPT override |
| Delay for a specified number of milliseconds. | |
| u8 | getBrightness () const FL_NO_EXCEPT override |
| Get the current global brightness. | |
| fl::span< CRGB > | getLEDs () FL_NO_EXCEPT override |
| Get the LED array as a span. | |
| u16 | getMaxRefreshRate () const FL_NO_EXCEPT override |
| Get the maximum refresh rate. | |
| size_t | getNumLEDs () const FL_NO_EXCEPT override |
| Get the number of LEDs. | |
| void | setBrightness (u8 brightness) FL_NO_EXCEPT override |
| Set the global brightness. | |
| void | setCorrection (CRGB correction) FL_NO_EXCEPT override |
| Set color correction. | |
| void | setMaxRefreshRate (u16 fps) FL_NO_EXCEPT override |
| Set the maximum refresh rate. | |
| void | setSegment (size_t start, size_t end) FL_NO_EXCEPT override |
| Set a segment range for subsequent operations. | |
| void | setTemperature (CRGB temperature) FL_NO_EXCEPT override |
| Set color temperature. | |
| void | show () FL_NO_EXCEPT override |
| Send the LED data to the strip Uses the current brightness setting. | |
| void | show (u8 brightness) FL_NO_EXCEPT override |
| Send the LED data to the strip with a specific brightness. | |
Public Member Functions inherited from fl::IFastLED | |
| virtual | ~IFastLED () FL_NO_EXCEPT=default |
Private Attributes | |
| u8 | mControllerIndex |
| bool | mHasSegment |
| size_t | mSegmentEnd |
| size_t | mSegmentStart |