Fix WifiScan JSON Response

This commit is contained in:
Adrian Scillato 2022-08-03 02:39:51 -07:00 committed by GitHub
parent f514d1702d
commit 058f9ecea9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,8 +127,9 @@ void CmndWifiScan(void)
delay(0);
char stemp1[20];
ResponseAppend_P(PSTR("{"));
for (uint32_t i = 0; i < WiFi.scanComplete(); i++) {
ResponseAppend_P(PSTR("{\"" D_STATUS5_NETWORK "%d\":{\"" D_SSID "\":\"%s\", \"" D_BSSID "\":\"%s\", \"" D_CHANNEL
ResponseAppend_P(PSTR("\"" D_STATUS5_NETWORK "%d\":{\"" D_SSID "\":\"%s\", \"" D_BSSID "\":\"%s\", \"" D_CHANNEL
"\":\"%d\", \"" D_JSON_SIGNAL "\":\"%d\", \"" D_RSSI "\":\"%d\", \"" D_JSON_ENCRYPTION "\":\"%s\"}"),
i+1,
WiFi.SSID(indexes[i]).c_str(),