Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
55b95e1e
Commit
55b95e1e
authored
Feb 14, 2022
by
Eric Duminil
Browse files
Doc
parent
35dc8c16
Pipeline
#5810
passed with stage
in 2 minutes and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/wifi_util.cpp
View file @
55b95e1e
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment