From 5f8da7e2b0c9a3a7e9acda0b08482e5968115fe8 Mon Sep 17 00:00:00 2001 From: KatAst Date: Sat, 2 Jan 2016 12:49:59 +0100 Subject: [PATCH] Redundant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added an if statement to APs scans cgi to avoid scan in AP mode. Reduced to one set of warnings and add a fourth line to cover the only AP mode option in Soft-AP settingĀ“s page --- esp-link/cgiwifi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/esp-link/cgiwifi.c b/esp-link/cgiwifi.c index bb170ff..8c6b33e 100644 --- a/esp-link/cgiwifi.c +++ b/esp-link/cgiwifi.c @@ -705,11 +705,6 @@ static char *wifiWarn[] = { 0, "Switch to STA+AP mode", "Switch to STA+AP mode", "Switch to STA mode", -}; - -static char *apWifiWarn[] = { 0, - "Switch to STA+AP mode", - "Switch to STA+AP mode", "Switch to AP mode", }; @@ -743,7 +738,8 @@ int ICACHE_FLASH_ATTR printWifiInfo(char *buff) { int p = wifi_get_phy_mode(); char *phy = wifiPhy[p&3]; char *warn = wifiWarn[op]; - char *apwarn = apWifiWarn[op]; + if (op == 3) op = 4; // Done to use only one set of warnings + char *apwarn = wifiWarn[op]; char *apauth = apAuthMode[apconf.authmode]; sint8 rssi = wifi_station_get_rssi(); if (rssi > 0) rssi = 0;