FastLED 3.9.15
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 131 of file channel.cpp.hpp.

133 {
134 if (!exclusive.empty()) {
135 FL_ERROR("Channel '" << channelName << "': bound driver '" << driverName
136 << "' is currently DISABLED by exclusive-driver selection '"
137 << exclusive << "'. Frame will be silently dropped. "
138 << "Resolve with: FastLED.enableDrivers<fl::Bus::"
139 << driverName << ">() or FastLED.enableAllDrivers().");
140 } else {
141 FL_ERROR("Channel '" << channelName << "': bound driver '" << driverName
142 << "' is currently DISABLED. Frame will be silently dropped. "
143 << "Resolve with: FastLED.enableDrivers<fl::Bus::"
144 << driverName << ">() or FastLED.enableAllDrivers().");
145 }
146}
bool empty() const FL_NOEXCEPT
#define FL_ERROR(X)
Definition log.h:219

References emitDisabledDriverError(), FL_ERROR, and FL_NOEXCEPT.

Referenced by emitDisabledDriverError().

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