Skip to content

Commit 7623846

Browse files
committed
UNOR4 OTA: add missing return value
1 parent 87766d8 commit 7623846

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ota/implementation/OTAUnoR4.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,13 @@ OTACloudProcessInterface::State UNOR4OTACloudProcess::flashOTA() {
9898
}
9999

100100
/* Flash new firmware */
101-
if ((ota_err = ota.update(UPDATE_FILE_NAME)) != OTAUpdate::OTA_ERROR_NONE) { // This reboots the MCU
101+
if ((ota_err = ota.update(UPDATE_FILE_NAME)) != OTAUpdate::OTA_ERROR_NONE) {
102102
DEBUG_VERBOSE("OTAUpdate::update() failed with %d", ota_err);
103103
return convertUnor4ErrorToState(ota_err);
104104
}
105+
106+
/* This is never called because ota.uptade reboots the microcontroller */
107+
return Resume;
105108
}
106109

107110
OTACloudProcessInterface::State UNOR4OTACloudProcess::reboot() {

0 commit comments

Comments
 (0)