Validate that all expected drivers are present.
153 {
154 fl::vector<const char*> expected;
156
157 if (expected.
empty()) {
158 Serial.println(
"\n[WARNING] Unknown platform - skipping driver validation");
159 return;
160 }
161
162 fl::sstream ss;
167
168
170
171
173 ss <<
"\nExpected drivers (" << expected.
size() <<
"):\n";
174 for (fl::size i = 0; i < expected.
size(); i++) {
175 ss << " - " << expected[i] << "\n";
176 }
178
179
181 ss << "\nAvailable drivers (" << drivers.size() << "):\n";
182 for (fl::size i = 0; i < drivers.size(); i++) {
183 ss <<
" - " << drivers[i].name.
c_str()
184 << " (priority: " << drivers[i].priority
185 << ", enabled: " << (drivers[i].enabled ? "yes" : "no") << ")\n";
186 }
188
189
190 Serial.println(
"\nValidation results:");
191 for (fl::size i = 0; i < expected.
size(); i++) {
192 const char* expName = expected[i];
193 bool found = false;
194
195 for (fl::size j = 0; j < drivers.size(); j++) {
196 if (
fl::strcmp(drivers[j].name.c_str(), expName) == 0) {
197 found = true;
198 break;
199 }
200 }
201
202 fl::sstream resultMsg;
203 resultMsg << expName << " driver " << (found ? "found" : "MISSING!");
205 }
206 }
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
fl::span< const fl::DriverInfo > getDriverInfos() const
Get full state of all registered channel drivers.
void recordResult(const char *name, bool passed)
Record a test result.
const char * c_str() const FL_NOEXCEPT
string str() const FL_NOEXCEPT
const char * c_str() const FL_NOEXCEPT
fl::size size() const FL_NOEXCEPT
bool empty() const FL_NOEXCEPT
int strcmp(const char *s1, const char *s2) FL_NOEXCEPT