| 48 | } |
| 49 | |
| 50 | void flash(int numberOfFlashes, const std::vector<std::string>& colors, const std::string& finalColour) { |
| 51 | if (numberOfFlashes <= 0 || colors.empty()) { |
| 52 | Serial.println("Invalid parameters for flash: Check numberOfFlashes or colors vector."); |
| 53 | return; |
| 54 | } |
| 55 | |
| 56 | for (int i = 0; i < numberOfFlashes; ++i) { |
| 57 | for (const auto& color : colors) { |
| 58 | setNeoPixelColour(color); |
| 59 | delay(500); |
| 60 | } |
| 61 | } |
| 62 | setNeoPixelColour(finalColour); |
| 63 | } |
nothing calls this directly
no test coverage detected