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
b2d5d472
Commit
b2d5d472
authored
Feb 20, 2022
by
Eric Duminil
Browse files
ap 0/1
parent
34c87002
Pipeline
#5884
passed with stage
in 2 minutes and 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
b2d5d472
...
...
@@ -100,7 +100,7 @@ make upload board=esp32 && make monitor # For ESP32
In Arduino IDE
*Serial Monitor*
or PlatformIO
*Monitor*
, type
`help`
+
<kbd>
Enter
</kbd>
in order to list the available commands:
*
`ap
!`
(Forc
es access point
mode
).
*
`ap
0/1`
(Disables/enabl
es access point).
*
`auto_calibrate 0/1`
(Disables/enables autocalibration).
*
`calibrate 600`
(Starts calibration process, to given ppm).
*
`calibrate`
(Starts calibration process).
...
...
ampel-firmware/web_config.cpp
View file @
b2d5d472
...
...
@@ -266,10 +266,15 @@ namespace web_config {
}
//NOTE: Can only work if wifi is on.
sensor_console
::
defineCommand
(
"ap!"
,
[]()
{
Serial
.
println
(
F
(
"Forcing AP mode!"
));
iotWebConf
->
forceApMode
(
true
);
},
F
(
"(Forces access point mode)"
));
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)"
));
iotWebConf
->
setWifiConnectionTimeoutMs
(
1000UL
*
config
::
wifi_timeout
);
...
...
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