Skip to content

Commit 3bb5207

Browse files
author
Veijo Pesonen
committed
Drop redundant check for default soft AP mode change
Firmware will write to flash only on value change
1 parent 90b4701 commit 3bb5207

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

ESP8266Interface.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -254,18 +254,7 @@ bool ESP8266Interface::_get_firmware_ok()
254254

255255
bool ESP8266Interface::_disable_default_softap()
256256
{
257-
static int disabled = false;
258-
259-
if (disabled || _esp.default_wifi_mode() == ESP8266::WIFIMODE_STATION) {
260-
disabled = true;
261-
return true;
262-
}
263-
if (_esp.set_default_wifi_mode(ESP8266::WIFIMODE_STATION)) {
264-
disabled = true;
265-
return true;
266-
}
267-
268-
return false;
257+
return _esp.set_default_wifi_mode(ESP8266::WIFIMODE_STATION);
269258
}
270259

271260
nsapi_error_t ESP8266Interface::_init(void)

0 commit comments

Comments
 (0)