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

◆ testAllDrivers()

void DriverTestRunner::testAllDrivers ( )
inlineprivate

Test all available drivers.

Definition at line 213 of file TestRunner.h.

213 {
214 auto drivers = FastLED.getDriverInfos();
215
216 fl::sstream ss;
217 ss << BOX_TOP;
218 ss << "| TESTING ALL AVAILABLE DRIVERS |\n";
219 ss << BOX_BOTTOM;
220 Serial.print(ss.str().c_str());
221
222 Serial.print("Found ");
223 Serial.print(drivers.size());
224 Serial.println(" driver(s) to test\n");
225
226 int tested = 0;
227 int skipped = 0;
228
229 for (fl::size i = 0; i < drivers.size(); i++) {
230 const char* name = drivers[i].name.c_str();
231 if (drivers[i].name.empty()) {
232 Serial.println(" [SKIP] Unnamed driver");
233 skipped++;
234 continue;
235 }
236
237 if (testSingleDriver(name)) {
238 tested++;
239 } else {
240 skipped++;
241 }
242
243 delay(500); // Brief pause between driver tests
244 }
245
246 Serial.print("\n");
247 Serial.print(LINE_SEP);
248 Serial.print("Driver tests complete: ");
249 Serial.print(tested);
250 Serial.print(" tested, ");
251 Serial.print(skipped);
252 Serial.println(" skipped");
253 }
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
#define BOX_TOP
Definition TestRunner.h:27
#define LINE_SEP
Definition TestRunner.h:30
#define BOX_BOTTOM
Definition TestRunner.h:29
fl::span< const fl::DriverInfo > getDriverInfos() const
Get full state of all registered channel drivers.
bool testSingleDriver(const char *driverName)
Test a single driver with LED patterns.
Definition TestRunner.h:258
const char * c_str() const FL_NOEXCEPT
string str() const FL_NOEXCEPT
Definition strstream.h:43
void delay(u32 ms, bool run_async=true) FL_NOEXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
Definition delay.h:98
#define Serial
Definition serial.h:304

References BOX_BOTTOM, BOX_TOP, fl::basic_string::c_str(), FastLED, LINE_SEP, Serial, fl::sstream::str(), and testSingleDriver().

Referenced by runAllTests().

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