MCPcopy Create free account
hub / github.com/FastLED/FastLED / clearAllDrivers

Method clearAllDrivers

src/fl/channels/manager.cpp.hpp:205–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void ChannelManager::clearAllDrivers() {
206 FL_DBG("ChannelManager: Waiting for all drivers to become READY before clearing");
207
208 // Wait for all drivers to become READY before clearing
209 // This prevents clearing drivers that are still transmitting
210 waitForReady();
211
212 FL_DBG("ChannelManager: Clearing " << mDrivers.size() << " drivers");
213
214 for (auto& entry : mDrivers) {
215 if (entry.driver) {
216 entry.driver->setPollNeededCallback(IChannelDriver::PollNeededCallback());
217 }
218 }
219
220 // Clear all drivers (shared_ptr handles cleanup automatically)
221 mDrivers.clear();
222}
223
224void ChannelManager::setDriverEnabled(const char* name, bool enabled) {
225 if (!name) {

Callers 4

clearMethod · 0.80
channel.cppFile · 0.80
FL_TEST_FILEFunction · 0.80
platform.hppFile · 0.80

Calls 4

PollNeededCallbackClass · 0.85
sizeMethod · 0.45
setPollNeededCallbackMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected