FastLED 3.9.15
Loading...
Searching...
No Matches

◆ autoResearchSetExclusiveDriverByName()

bool autoResearchSetExclusiveDriverByName ( const char * name)

AutoResearch-style helper: set an exclusive driver by name.

Parameters
nameDriver name (case-sensitive — must match an IChannelDriver::getName() value)
Returns
true if the driver was found and set as exclusive

AutoResearch resolves driver names at runtime from RPC/JSON payloads, so it can't use the typed FastLED.setExclusiveDriver(fl::Bus) form. This wrapper forwards to ChannelManager::instance().setExclusiveDriverByName(name).

Precondition: The caller must already have enrolled every available driver via FastLED.enableAllDrivers() (typically once in setup()). This helper deliberately does NOT call enableAllDrivers() itself — calling it per-iteration in a discovery loop re-adds every driver each time, triggering ChannelManager's "Replacing existing driver" path and resetting state mid-test (#2469).

For built-in driver code that knows its driver at compile time, use FastLED.setExclusiveDriver(fl::Bus::X) instead (typo-safe).

Definition at line 27 of file AutoResearchHelpers.cpp.

27 {
28 // AutoResearch resolves driver names at runtime (RPC/JSON). The caller
29 // (AutoResearch.ino setup()) must already have enrolled every available
30 // driver via FastLED.enableAllDrivers(). We deliberately do NOT call
31 // enableAllDrivers() here — doing it per-iteration would re-add every
32 // driver each call, triggering ChannelManager's "Replacing existing driver"
33 // path and resetting state mid-test (#2469).
35}
bool setExclusiveDriverByName(const char *name) FL_NOEXCEPT
Enable only one driver exclusively (disables all others) — by-name escape hatch.
static ChannelManager & instance() FL_NOEXCEPT
Get the global singleton instance.

References fl::ChannelManager::instance(), and fl::ChannelManager::setExclusiveDriverByName().

Referenced by autoresearch::maybeRegisterStubAutorun(), AutoResearchRemoteControl::registerFunctions(), AutoResearchRemoteControl::runSingleTestImpl(), and testDriver().

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