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
c987a3c1
Commit
c987a3c1
authored
Mar 03, 2022
by
Eric Duminil
Browse files
AP 1 0
parent
1d090ccc
Changes
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/ampel-firmware.ino
View file @
c987a3c1
...
...
@@ -147,8 +147,21 @@ void setup()
sensor_console
::
defineStringCommand
(
"ap_pwd"
,
[](
char
*
pwd
)
{
Serial
.
print
(
F
(
"Setting AP password to "
));
Serial
.
println
(
pwd
);
strlcpy
(
iotWebConf
.
get
Wifi
PasswordParameter
()
->
valueBuffer
,
pwd
,
iotWebConf
.
get
Wifi
PasswordParameter
()
->
getLength
());
strlcpy
(
iotWebConf
.
get
Ap
PasswordParameter
()
->
valueBuffer
,
pwd
,
iotWebConf
.
get
Ap
PasswordParameter
()
->
getLength
());
},
F
(
"abc (Sets AP password to abc)"
));
sensor_console
::
defineIntCommand
(
"ap"
,
[](
int
onOff
)
{
if
(
onOff
)
{
Serial
.
print
(
F
(
"Enable "
));
}
else
{
Serial
.
print
(
F
(
"Disable "
));
}
Serial
.
println
(
F
(
"AP mode!"
));
iotWebConf
.
forceApMode
(
onOff
);
},
F
(
"0/1 (Enables/disables access point)"
));
//TODO: Remove fluff
//TODO: Add wifi on/off?
Serial
.
println
(
"Ready."
);
}
...
...
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