Commit b2d5d472 authored by Eric Duminil's avatar Eric Duminil
Browse files

ap 0/1

parent 34c87002
Pipeline #5884 passed with stage
in 2 minutes and 19 seconds
......@@ -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!` (Forces access point mode).
* `ap 0/1` (Disables/enables access point).
* `auto_calibrate 0/1` (Disables/enables autocalibration).
* `calibrate 600` (Starts calibration process, to given ppm).
* `calibrate` (Starts calibration process).
......
......@@ -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);
......
Supports Markdown
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