Skip to content

Commit fc6c754

Browse files
author
Veijo Pesonen
committed
Adds halting the system if too old firmware
1 parent f19e53d commit fc6c754

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ESP8266Interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,13 @@ bool ESP8266Interface::_get_firmware_ok()
301301
if (at_v.major < ESP8266_AT_VERSION_MAJOR) {
302302
debug("ESP8266: ERROR: AT Firmware v%d incompatible with this driver.", at_v.major);
303303
debug("Update at least to v%d - https://developer.mbed.org/teams/ESP8266/wiki/Firmware-Update\n", ESP8266_AT_VERSION_MAJOR);
304-
return false;
304+
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_UNSUPPORTED), "Too old AT firmware");
305305
}
306306
ESP8266::fw_sdk_version sdk_v = _esp.sdk_version();
307307
if (sdk_v.major < ESP8266_SDK_VERSION_MAJOR) {
308308
debug("ESP8266: ERROR: Firmware v%d incompatible with this driver.", sdk_v.major);
309309
debug("Update at least to v%d - https://developer.mbed.org/teams/ESP8266/wiki/Firmware-Update\n", ESP8266_SDK_VERSION_MAJOR);
310-
return false;
310+
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_UNSUPPORTED), "Too old SDK firmware");
311311
}
312312

313313
return true;

0 commit comments

Comments
 (0)