mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-06 01:16:02 +08:00
Workaround the WiFi scan not working on Serial with latest ESP32 core
This commit is contained in:
parent
e903dce63f
commit
bdb40f0ab8
@ -47,10 +47,10 @@ bool Commands::ESP410(const char* cmd_params, level_authenticate_type auth_type,
|
|||||||
bool plain = hastag(cmd_params,"plain");
|
bool plain = hastag(cmd_params,"plain");
|
||||||
int n = 0;
|
int n = 0;
|
||||||
uint8_t total = 0;
|
uint8_t total = 0;
|
||||||
|
n = WiFi.scanNetworks ();
|
||||||
if (plain) {
|
if (plain) {
|
||||||
output->printLN ("Start Scan");
|
output->printLN ("Start Scan");
|
||||||
}
|
}
|
||||||
n = WiFi.scanNetworks ();
|
|
||||||
if (!plain) {
|
if (!plain) {
|
||||||
output->print ("{\"AP_LIST\":[");
|
output->print ("{\"AP_LIST\":[");
|
||||||
}
|
}
|
||||||
@ -104,7 +104,9 @@ bool Commands::ESP410(const char* cmd_params, level_authenticate_type auth_type,
|
|||||||
if (!plain) {
|
if (!plain) {
|
||||||
output->printLN ("]}");
|
output->printLN ("]}");
|
||||||
} else {
|
} else {
|
||||||
|
if(total>0) {
|
||||||
output->printLN ("");
|
output->printLN ("");
|
||||||
|
}
|
||||||
output->printLN ("End Scan");
|
output->printLN ("End Scan");
|
||||||
}
|
}
|
||||||
WiFi.mode((WiFiMode_t)currentmode);
|
WiFi.mode((WiFiMode_t)currentmode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user