improved wifi scan (must be fired now, not automatically any more)

This commit is contained in:
lumapu 2022-10-23 20:47:32 +02:00
parent 4ad6219be7
commit 3764aa4ce1
7 changed files with 53 additions and 18 deletions

View file

@ -456,7 +456,9 @@ bool webApi::setCtrl(DynamicJsonDocument jsonIn, JsonObject jsonOut) {
//-----------------------------------------------------------------------------
bool webApi::setSetup(DynamicJsonDocument jsonIn, JsonObject jsonOut) {
if(F("set_time") == jsonIn[F("cmd")])
if(F("scan_wifi"))
mApp->scanAvailNetworks();
else if(F("set_time") == jsonIn[F("cmd")])
mApp->setTimestamp(jsonIn[F("ts")]);
else if(F("sync_ntp") == jsonIn[F("cmd")])
mApp->setTimestamp(0); // 0: update ntp flag