Commit 55b95e1e authored by Eric Duminil's avatar Eric Duminil
Browse files

Doc

parent 35dc8c16
Pipeline #5810 passed with stage
in 2 minutes and 49 seconds
......@@ -19,8 +19,17 @@ namespace wifi {
return WiFi.status() == WL_CONNECTED;
}
/*
* Connection attempt, called in blocking mode by setup(). This way, LED effects can be shown
* without needing callbacks, but only during wifi_timeout seconds.
* If connection fails, access point will be started indefinitely, and corresponding
* LED effects will be shown during 5 seconds.
*
* Afterwards, the non-blocking web_config::update() will be called inside loop, and the ampel
* can display CO2 levels.
*/
void tryConnection() {
for (int i = 0; i <= config::wifi_timeout + 10; i++) {
for (int i = 0; i <= config::wifi_timeout + 5; i++) {
web_config::update();
if (WiFi.getMode() == WIFI_AP){
led_effects::alert(0x1cff68);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment