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

AP 1 0

parent 1d090ccc
......@@ -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.getWifiPasswordParameter()->valueBuffer, pwd, iotWebConf.getWifiPasswordParameter()->getLength());
strlcpy(iotWebConf.getApPasswordParameter()->valueBuffer, pwd, iotWebConf.getApPasswordParameter()->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.");
}
......
Markdown is supported
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