Skip to content

Commit 9c5dd4b

Browse files
author
Veijo Pesonen
committed
_get_firmware_ok() fixed to return boolean as it is expected to
1 parent d907363 commit 9c5dd4b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ESP8266Interface.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ bool ESP8266Interface::_get_firmware_ok()
244244
if (_esp.get_firmware_version() != ESP8266_VERSION) {
245245
debug("ESP8266: ERROR: Firmware incompatible with this driver.\
246246
\r\nUpdate to v%d - https://developer.mbed.org/teams/ESP8266/wiki/Firmware-Update\r\n",ESP8266_VERSION);
247-
return NSAPI_ERROR_DEVICE_ERROR;
247+
return false;
248248
}
249249

250-
return NSAPI_ERROR_OK;
250+
return true;
251251
}
252252

253253
bool ESP8266Interface::_disable_default_softap()
@@ -274,7 +274,7 @@ nsapi_error_t ESP8266Interface::_init(void)
274274
if (!_esp.reset()) {
275275
return NSAPI_ERROR_DEVICE_ERROR;
276276
}
277-
if (_get_firmware_ok() != NSAPI_ERROR_OK) {
277+
if (!_get_firmware_ok()) {
278278
return NSAPI_ERROR_DEVICE_ERROR;
279279
}
280280
if (_disable_default_softap() == false) {

0 commit comments

Comments
 (0)