mirror of https://github.com/arendst/Tasmota.git
Add new options to WIFI command
Actual Options: 0 - Turn Off Wi-Fi 1 - Turn On Wi-Fi New Options Added: 2 - Force the device to ONLY connects as a 11b device 3 - Force the device to ONLY connects as a 11b/g device 4 - Force the device to connects as a 11b/g/n device
This commit is contained in:
parent
ae133f1933
commit
5206054886
|
@ -2142,8 +2142,12 @@ void CmndWifi(void)
|
|||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) {
|
||||
Settings.flag4.network_wifi = XdrvMailbox.payload;
|
||||
if (Settings.flag4.network_wifi) { WifiEnable(); }
|
||||
#ifdef ESP8266
|
||||
} else if ((XdrvMailbox.payload >= 2) && (XdrvMailbox.payload <= 4)) {
|
||||
WiFi.setPhyMode(WiFiPhyMode_t(XdrvMailbox.payload - 1)); // 1-B/2-BG/3-BGN
|
||||
#endif
|
||||
}
|
||||
ResponseCmndStateText(Settings.flag4.network_wifi);
|
||||
Response_P(PSTR("{\"" D_JSON_WIFI "\":\"%s\",\"" D_JSON_WIFI_MODE "\":\"11%c\"}"), GetStateText(Settings.flag4.network_wifi), pgm_read_byte(&kWifiPhyMode[WiFi.getPhyMode() & 0x3]) );
|
||||
}
|
||||
|
||||
#ifdef USE_I2C
|
||||
|
|
Loading…
Reference in New Issue