Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
29ac1bbd
Commit
29ac1bbd
authored
May 09, 2021
by
Eric Duminil
Browse files
Trying to add callbacks
parent
2d458359
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/wifi_util.cpp
View file @
29ac1bbd
...
...
@@ -46,6 +46,26 @@ namespace wifi {
void
connect
(
const
char
*
hostname
)
{
sensor_console
::
defineCommand
(
"wifi_scan"
,
scanNetworks
,
F
(
"(Scans available WiFi networks)"
));
sensor_console
::
defineCommand
(
"local_ip"
,
showLocalIp
,
F
(
"(Displays local IP and current SSID)"
));
sensor_console
::
defineCommand
(
"wifi_reset"
,
[]()
{
wifiManager
.
resetSettings
();
},
F
(
"(Resets wifi config)"
));
wifiManager
.
setAPCallback
([](
WiFiManager
*
x
)
{
led_effects
::
showRainbowWheel
();
});
wifiManager
.
setWebServerCallback
([]()
{
led_effects
::
showKITTWheel
(
color
::
green
);
});
wifiManager
.
setSaveConfigCallback
([]()
{
led_effects
::
showKITTWheel
(
color
::
blue
);
});
wifiManager
.
setSaveConfigCallback
([]()
{
led_effects
::
showKITTWheel
(
color
::
magenta
);
});
wifiManager
.
autoConnect
(
hostname
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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