FastLED 3.10.6
Loading...
Searching...
No Matches

◆ emitDisabledDriverError()

static FL_NO_INLINE void fl::anonymous_namespace{channel.cpp.hpp}::emitDisabledDriverError ( const fl::string & channelName,
const fl::string & driverName,
const fl::string & exclusive )
static

Out-of-line cold-path emitter for the #2517 silent-drop DISABLED-driver diagnostic in Channel::showPixels.

showPixels runs every frame, but this diagnostic is gated behind a one-shot latch (mDisabledDriverWarned) and only fires when a bound driver has been runtime-disabled (typically by FastLED.setExclusiveDriver<OtherBus>()). Inlining the two alternative FL_ERROR chains was costing ~10 operator<< instantiations in showPixels' prologue/epilogue for code that runs at most once per channel lifetime. Splitting matches the same pattern the maintainer adopted for resolveDynamicDriver() in PR #2830 — keep the diagnostic chain in a FL_NO_INLINE helper so it can't fold back into the hot path. (#2773 follow-up to #2832.)

Definition at line 215 of file channel.cpp.hpp.

217 {
218 FL_UNUSED(channelName); // only consumed by FL_ERROR, a no-op on small platforms
219 FL_UNUSED(driverName);
220 if (!exclusive.empty()) {
221 FL_ERROR("Channel '%s': bound driver '%s' is currently DISABLED by exclusive-driver selection '%s'. Frame will be silently dropped. Resolve with: FastLED.enableDrivers<fl::Bus::%s>() or FastLED.enableAllDrivers().", channelName, driverName, exclusive, driverName);
222 } else {
223 FL_ERROR("Channel '%s': bound driver '%s' is currently DISABLED. Frame will be silently dropped. Resolve with: FastLED.enableDrivers<fl::Bus::%s>() or FastLED.enableAllDrivers().", channelName, driverName, driverName);
224 }
225}
bool empty() const FL_NO_EXCEPT
#define FL_UNUSED(x)
#define FL_ERROR(...)
Definition log.h:372

References emitDisabledDriverError(), FL_ERROR, fl::FL_NO_EXCEPT, and FL_UNUSED.

Referenced by emitDisabledDriverError().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: