FastLED 3.10.8
Loading...
Searching...
No Matches
client.h
Go to the documentation of this file.
1#pragma once
2
3#include "fl/stl/shared_ptr.h"
4#include "fl/stl/span.h"
5
6namespace fl {
7
29public:
35
43
49
57 void setOn(bool on) FL_NO_EXCEPT;
58
63 bool getOn() const FL_NO_EXCEPT { return mOn; }
64
72 void clear(bool writeToStrip = false) FL_NO_EXCEPT;
73
80 void update() FL_NO_EXCEPT;
81
89
94 size_t getNumLEDs() const FL_NO_EXCEPT;
95
104 void setSegment(size_t start, size_t end) FL_NO_EXCEPT;
105
113
121 void setCorrection(CRGB correction) FL_NO_EXCEPT;
122
130 void setTemperature(CRGB temperature) FL_NO_EXCEPT;
131
139 void setMaxRefreshRate(u16 fps) FL_NO_EXCEPT;
140
146
147private:
148 fl::shared_ptr<IFastLED> mController; // FastLED controller interface
149 u8 mBrightness; // Current brightness (0-255)
150 bool mOn; // On/off state
151};
152
153} // namespace fl
fl::UISlider brightness("Brightness", BRIGHTNESS, 0, 255)
CLEDController * controller
Pure virtual interface for FastLED operations.
Definition ifastled.h:24
void clear(bool writeToStrip=false) FL_NO_EXCEPT
Clear all LEDs.
size_t getNumLEDs() const FL_NO_EXCEPT
Get number of LEDs.
void setBrightness(u8 brightness) FL_NO_EXCEPT
Set brightness level.
bool getOn() const FL_NO_EXCEPT
Get on/off state.
Definition client.h:63
void setMaxRefreshRate(u16 fps) FL_NO_EXCEPT
Set maximum refresh rate.
WLEDClient(fl::shared_ptr< IFastLED > controller) FL_NO_EXCEPT
Construct WLEDClient with FastLED controller.
fl::span< CRGB > getLEDs() FL_NO_EXCEPT
Get access to LED array.
void update() FL_NO_EXCEPT
Update physical LED strip.
u8 getBrightness() const FL_NO_EXCEPT
Get current brightness level.
Definition client.h:48
void setSegment(size_t start, size_t end) FL_NO_EXCEPT
Set a segment range for subsequent operations.
u16 getMaxRefreshRate() const FL_NO_EXCEPT
Get maximum refresh rate.
void setTemperature(CRGB temperature) FL_NO_EXCEPT
Set color temperature.
void clearSegment() FL_NO_EXCEPT
Clear the segment range (operate on full LED array)
fl::shared_ptr< IFastLED > mController
Definition client.h:148
void setOn(bool on) FL_NO_EXCEPT
Set on/off state.
void setCorrection(CRGB correction) FL_NO_EXCEPT
Set color correction.
constexpr T * end(T(&array)[N]) FL_NO_EXCEPT
unsigned char u8
Definition stdint.h:131
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
Base definition for an LED controller.
Definition crgb.hpp:179
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Definition crgb.h:38