Clear/reset FastLED state based on the provided flags.
Waits for all pending channel bus transmissions to complete, then clears the specified settings. Multiple flags can be combined using bitwise OR (|).
161 {
162
163 auto clearFlag = [&flags](
ClearFlags flag) ->
bool {
165 flags =
static_cast<ClearFlags>(
static_cast<fl::u32
>(flags) & ~static_cast<fl::u32>(flag));
166 return true;
167 }
168 return false;
169 };
170
171
172
176 }
177
178
181 }
182
183
186 }
187
188
191 }
192
193
195
196
198
199
200
201 fl::vector<fl::ChannelPtr> channelsCopy =
channels();
202 for (auto& channel : channelsCopy) {
204 }
205
206
209
210
212 }
213
214
216
220 }
221
222
224}
ClearFlags
Flags for FastLED.clear() to control what state gets cleared/reset.
@ CHANNEL_ENGINES
Clear all channel drivers from ChannelManager.
@ FPS_COUNTER
Reset FPS tracking counter to 0.
@ NONE
Clear nothing (no-op)
@ REFRESH_RATE
Reset refresh rate limiting to unlimited.
#define FL_ASSERT(x, MSG)
power_func mPPowerFunc
function for overriding brightness when using FastLED.show();
static fl::vector< fl::ChannelPtr > & channels()
stored ChannelPtrs to keep them alive
static void remove(fl::ChannelPtr channel)
Remove a channel from the LED controller list.
fl::u8 mScale
the current global brightness scale setting
fl::u32 mNPowerData
max power use parameter
fl::u16 mNFPS
tracking for current frames per second (FPS) value
fl::u32 mNMinMicros
minimum µs between frames, used for capping frame rates
void wait()
Wait for all channel bus transmissions to complete.
void reset() FL_NOEXCEPT
Reset bus manager state, clearing all enqueued and transmitting channels.
void clearAllDrivers() FL_NOEXCEPT
Remove all drivers from the manager.
ChannelManager & channelManager()
Get the global ChannelManager singleton instance.