Skip to content

Commit a061542

Browse files
author
Veijo Pesonen
committed
Adds halting the system if too old firmware
1 parent 7dbc13e commit a061542

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
@@ -291,13 +291,13 @@ bool ESP8266Interface::_get_firmware_ok()
291291
if (at_v.major < ESP8266_AT_VERSION_MAJOR) {
292292
debug("ESP8266: ERROR: AT Firmware v%d incompatible with this driver.", at_v.major);
293293
debug("Update at least to v%d - https://developer.mbed.org/teams/ESP8266/wiki/Firmware-Update\n", ESP8266_AT_VERSION_MAJOR);
294-
return false;
294+
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_UNSUPPORTED), "Too old AT firmware");
295295
}
296296
ESP8266::fw_sdk_version sdk_v = _esp.sdk_version();
297297
if (sdk_v.major < ESP8266_SDK_VERSION_MAJOR) {
298298
debug("ESP8266: ERROR: Firmware v%d incompatible with this driver.", sdk_v.major);
299299
debug("Update at least to v%d - https://developer.mbed.org/teams/ESP8266/wiki/Firmware-Update\n", ESP8266_SDK_VERSION_MAJOR);
300-
return false;
300+
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_UNSUPPORTED), "Too old SDK firmware");
301301
}
302302

303303
return true;

0 commit comments

Comments
 (0)