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 (|).
238 {
239
240 auto clearFlag = [&flags](
ClearFlags flag) ->
bool {
242 flags =
static_cast<ClearFlags>(
static_cast<fl::u32
>(flags) & ~static_cast<fl::u32>(flag));
243 return true;
244 }
245 return false;
246 };
247
248
249
255 }
256
257
260 }
261
262
265 }
266
267
270 }
271
272
274
275
277
278
279
280 fl::vector<fl::ChannelPtr> channelsCopy =
channels();
281 for (auto& channel : channelsCopy) {
283 }
284
285
288
289
291 }
292
293
295
299 }
300
301
303}
#define FL_ASSERT(x, MSG)
power_func mPPowerFunc
function for overriding brightness when using FastLED.show();
static void remove(fl::ChannelPtr channel) FL_NO_EXCEPT
Remove a channel from the LED controller list.
static fl::vector< fl::ChannelPtr > & channels() FL_NO_EXCEPT
stored ChannelPtrs to keep them alive
void wait() FL_NO_EXCEPT
Wait for all channel bus transmissions to complete.
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::u8 mLastShownScale
brightness the last show()/showColor() applied, after the power limiter
fl::u8 mLastRequestedScale
brightness the last show()/showColor() was asked for
fl::u16 mMaxRefreshHz
frame-rate cap in Hz, 0 = unlimited (u16 saves 2 B over micros, #4788)
void reset() FL_NO_EXCEPT
Reset bus manager state, clearing all enqueued and transmitting channels.
void clearAllDrivers() FL_NO_EXCEPT
Remove all drivers from the manager.
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.
ChannelManager & channelManager() FL_NO_EXCEPT
Get the global ChannelManager singleton instance.