this should work for the same chip/copy as well
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2022-09-27 09:27:40 +02:00
parent d87baa8da9
commit 2614239fe4
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -206,6 +206,9 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
case (OBSW_UPDATE_FROM_SD_1): {
return executeSwUpdate(SwUpdateSources::SD_1, data, size);
}
case (OBSW_UPDATE_FROM_TMP): {
return executeSwUpdate(SwUpdateSources::TMP_DIR, data, size);
}
case (SWITCH_IMG_LOCK): {
if (size != 3) {
return HasActionsIF::INVALID_PARAMETERS;
@ -1894,10 +1897,6 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u
}
sif::info << "Executing SW update for Chip " << static_cast<int>(data[0]) << " Copy "
<< static_cast<int>(data[1]) << " from " << sourceStr << std::endl;
if (chip == CURRENT_CHIP and copy == CURRENT_COPY) {
// Not allowed / possible. TODO: Dedicated returnvalue?
return returnvalue::FAILED;
}
path prefixPath;
if (sourceDir == SwUpdateSources::SD_0) {
prefixPath = path(config::SD_0_MOUNT_POINT);