v1.14.0 #304

Merged
muellerr merged 366 commits from develop into main 2022-10-10 17:46:38 +02:00
9 changed files with 13 additions and 20 deletions
Showing only changes of commit 49efbc4725 - Show all commits

View File

@ -456,8 +456,8 @@ if(TGT_BSP MATCHES "arm/q7s")
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_GPS} ${LIB_ARCSEC}) target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_GPS} ${LIB_ARCSEC})
endif() endif()
target_link_libraries( target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION}
${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION} rapidcsv ${LIB_DUMMIES}) rapidcsv ${LIB_DUMMIES})
if(TGT_BSP MATCHES "arm/egse") if(TGT_BSP MATCHES "arm/egse")
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC}) target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})

View File

@ -142,7 +142,7 @@ ReturnValue_t CoreController::initialize() {
ReturnValue_t CoreController::initializeAfterTaskCreation() { ReturnValue_t CoreController::initializeAfterTaskCreation() {
ReturnValue_t result = returnvalue::OK; ReturnValue_t result = returnvalue::OK;
auto sdCard = sdcMan->setActiveSdCard(sdInfo.pref); auto sdCard = sdcMan->getPreferredSdCard();
if (not sdCard) { if (not sdCard) {
return returnvalue::FAILED; return returnvalue::FAILED;
} }
@ -436,16 +436,10 @@ ReturnValue_t CoreController::sdStateMachine() {
sdInfo.commandExecuted = true; sdInfo.commandExecuted = true;
} else { } else {
if (nonBlockingOpChecking(SdStates::DETERMINE_OTHER, 5, "Mounting SD card")) { if (nonBlockingOpChecking(SdStates::DETERMINE_OTHER, 5, "Mounting SD card")) {
<<<<<<< HEAD
sdInfo.prefState = sd::SdState::MOUNTED;
currentStateSetter(sdInfo.pref, sd::SdState::MOUNTED);
sdcMan->setActiveSdCard(sdInfo.pref);
=======
sdcMan->setActiveSdCard(sdInfo.active); sdcMan->setActiveSdCard(sdInfo.active);
currMntPrefix = sdcMan->getCurrentMountPrefix(); currMntPrefix = sdcMan->getCurrentMountPrefix();
sdInfo.activeState = sd::SdState::MOUNTED; sdInfo.activeState = sd::SdState::MOUNTED;
currentStateSetter(sdInfo.active, sd::SdState::MOUNTED); currentStateSetter(sdInfo.active, sd::SdState::MOUNTED);
>>>>>>> origin/develop
} }
} }
} }
@ -1882,11 +1876,11 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u
sourceStr = "tmp directory"; sourceStr = "tmp directory";
} }
bool sameChipAndCopy = false; bool sameChipAndCopy = false;
if(chip == CURRENT_CHIP and copy == CURRENT_COPY) { if (chip == CURRENT_CHIP and copy == CURRENT_COPY) {
// This is problematic if the OBSW is running as a systemd service. // This is problematic if the OBSW is running as a systemd service.
// Do not allow for now. // Do not allow for now.
return HasActionsIF::INVALID_PARAMETERS; return HasActionsIF::INVALID_PARAMETERS;
//sameChipAndCopy = true; // sameChipAndCopy = true;
} }
sif::info << "Executing SW update for Chip " << static_cast<int>(data[0]) << " Copy " sif::info << "Executing SW update for Chip " << static_cast<int>(data[0]) << " Copy "
<< static_cast<int>(data[1]) << " from " << sourceStr << std::endl; << static_cast<int>(data[1]) << " from " << sourceStr << std::endl;
@ -1922,7 +1916,7 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u
cmd.clear(); cmd.clear();
path obswDestPath; path obswDestPath;
path obswVersionDestPath; path obswVersionDestPath;
if(not sameChipAndCopy) { if (not sameChipAndCopy) {
cmd << "xsc_mount_copy " << std::to_string(data[0]) << " " << std::to_string(data[1]); cmd << "xsc_mount_copy " << std::to_string(data[0]) << " " << std::to_string(data[1]);
result = system(cmd.str().c_str()); result = system(cmd.str().c_str());
if (result != 0) { if (result != 0) {

View File

@ -532,7 +532,6 @@ void initmission::createTestTasks(TaskFactory& factory,
#endif // OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1 #endif // OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
} }
/** /**

View File

@ -553,9 +553,9 @@ void SdCardManager::setActiveSdCard(sd::SdCard sdCard) {
MutexGuard mg(mutex); MutexGuard mg(mutex);
sdInfo.active = sdCard; sdInfo.active = sdCard;
if (sdInfo.active == sd::SdCard::SLOT_0) { if (sdInfo.active == sd::SdCard::SLOT_0) {
currentPrefix = SD_0_MOUNT_POINT; currentPrefix = config::SD_0_MOUNT_POINT;
} else { } else {
currentPrefix = SD_1_MOUNT_POINT; currentPrefix = config::SD_1_MOUNT_POINT;
} }
} }

View File

@ -492,7 +492,7 @@ void PayloadPcduHandler::checkAdcValues() {
void PayloadPcduHandler::checkJsonFileInit() { void PayloadPcduHandler::checkJsonFileInit() {
if (not jsonFileInitComplete) { if (not jsonFileInitComplete) {
auto activeSd = sdcMan->getActiveSdCard(); auto activeSd = sdcMan->getActiveSdCard();
if (activeSd and sdcMan->isSdCardMounted(activeSd.value())) { if (activeSd and sdcMan->isSdCardUsable(activeSd.value())) {
params.initialize(sdcMan->getCurrentMountPrefix()); params.initialize(sdcMan->getCurrentMountPrefix());
jsonFileInitComplete = true; jsonFileInitComplete = true;
} }

View File

@ -7,7 +7,7 @@
#include <optional> #include <optional>
#include "commonSubsystemIds.h" #include "eive/eventSubsystemIds.h"
class SdCardMountedIF; class SdCardMountedIF;

View File

@ -1,7 +1,7 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_SCEXDEFINITIONS_H_ #ifndef MISSION_DEVICES_DEVICEDEFINITIONS_SCEXDEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_SCEXDEFINITIONS_H_ #define MISSION_DEVICES_DEVICEDEFINITIONS_SCEXDEFINITIONS_H_
#include <commonSubsystemIds.h> #include <eive/objects.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h> #include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <fsfw/events/Event.h> #include <fsfw/events/Event.h>

View File

@ -28,6 +28,6 @@ static constexpr uint32_t P60PDU_PARAM_SIZE = 0x13E;
static constexpr uint32_t P60ACU_HK_SIZE = 0x7C; static constexpr uint32_t P60ACU_HK_SIZE = 0x7C;
static constexpr uint32_t P60ACU_PARAM_SIZE = 0x1B; static constexpr uint32_t P60ACU_PARAM_SIZE = 0x1B;
} } // namespace gsConstants
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINES_H_ */ #endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINES_H_ */

View File

@ -10,7 +10,7 @@ class SdCardMountedIF {
public: public:
virtual ~SdCardMountedIF(){}; virtual ~SdCardMountedIF(){};
virtual const std::string& getCurrentMountPrefix() const = 0; virtual const std::string& getCurrentMountPrefix() const = 0;
virtual bool isSdCardMounted(sd::SdCard sdCard) = 0; virtual bool isSdCardUsable(sd::SdCard sdCard) = 0;
virtual std::optional<sd::SdCard> getPreferredSdCard() const = 0; virtual std::optional<sd::SdCard> getPreferredSdCard() const = 0;
virtual void setActiveSdCard(sd::SdCard sdCard) = 0; virtual void setActiveSdCard(sd::SdCard sdCard) = 0;
virtual std::optional<sd::SdCard> getActiveSdCard() const = 0; virtual std::optional<sd::SdCard> getActiveSdCard() const = 0;