From db032606b2716f13efc11524964031327ccacec8 Mon Sep 17 00:00:00 2001 From: Eric Duminil <eric.duminil@gmail.com> Date: Sun, 13 Feb 2022 11:30:11 +0100 Subject: [PATCH] Rainbow wheel for wifi connection, magenta KITT for AP --- ampel-firmware/wifi_util.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ampel-firmware/wifi_util.cpp b/ampel-firmware/wifi_util.cpp index 5dcacfb..915445f 100644 --- a/ampel-firmware/wifi_util.cpp +++ b/ampel-firmware/wifi_util.cpp @@ -20,9 +20,16 @@ namespace wifi { } void tryConnection() { - for (int i = 0; i <= 30 && !connected(); i++) { - led_effects::showRainbowWheel(); + //TODO: configurable timeout + for (int i = 0; i <= 30; i++) { web_config::update(); + if (connected()) { + break; + } else if (WiFi.status() == WL_NO_SHIELD) { // Access point, apparently + led_effects::showKITTWheel(0xFF0015, 1); + } else { + led_effects::showRainbowWheel(); + } Serial.print("."); } } -- GitLab