FastLED 3.10.8
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 200 of file channel.cpp.hpp.

202 {
203 FL_UNUSED(channelName); // only consumed by FL_ERROR, a no-op on small platforms
204 FL_UNUSED(driverName);
205 if (!exclusive.empty()) {
206 FL_ERROR("Channel '" << channelName << "': bound driver '" << driverName << "' is currently DISABLED by exclusive-driver selection '" << exclusive << "'. Frame will be silently dropped. Resolve with: FastLED.enableDrivers<fl::Bus::" << driverName << ">() or FastLED.enableAllDrivers().");
207 } else {
208 FL_ERROR("Channel '" << channelName << "': bound driver '" << driverName << "' is currently DISABLED. Frame will be silently dropped. Resolve with: FastLED.enableDrivers<fl::Bus::" << driverName << ">() or FastLED.enableAllDrivers().");
209 }
210}
bool empty() const FL_NO_EXCEPT
#define FL_ERROR(...)
Definition log.h:373
#define FL_UNUSED(x)

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: