v1.14.0 #304
@ -456,8 +456,8 @@ if(TGT_BSP MATCHES "arm/q7s")
|
||||
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC ${LIB_GPS} ${LIB_ARCSEC})
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION} rapidcsv ${LIB_DUMMIES})
|
||||
target_link_libraries(${UNITTEST_NAME} PRIVATE Catch2 ${LIB_EIVE_MISSION}
|
||||
rapidcsv ${LIB_DUMMIES})
|
||||
|
||||
if(TGT_BSP MATCHES "arm/egse")
|
||||
target_link_libraries(${OBSW_NAME} PRIVATE ${LIB_ARCSEC})
|
||||
|
@ -142,7 +142,7 @@ ReturnValue_t CoreController::initialize() {
|
||||
|
||||
ReturnValue_t CoreController::initializeAfterTaskCreation() {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
auto sdCard = sdcMan->setActiveSdCard(sdInfo.pref);
|
||||
auto sdCard = sdcMan->getPreferredSdCard();
|
||||
if (not sdCard) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
@ -436,16 +436,10 @@ ReturnValue_t CoreController::sdStateMachine() {
|
||||
sdInfo.commandExecuted = true;
|
||||
} else {
|
||||
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);
|
||||
currMntPrefix = sdcMan->getCurrentMountPrefix();
|
||||
sdInfo.activeState = 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";
|
||||
}
|
||||
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.
|
||||
// Do not allow for now.
|
||||
return HasActionsIF::INVALID_PARAMETERS;
|
||||
//sameChipAndCopy = true;
|
||||
// sameChipAndCopy = true;
|
||||
}
|
||||
sif::info << "Executing SW update for Chip " << static_cast<int>(data[0]) << " Copy "
|
||||
<< static_cast<int>(data[1]) << " from " << sourceStr << std::endl;
|
||||
@ -1922,7 +1916,7 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u
|
||||
cmd.clear();
|
||||
path obswDestPath;
|
||||
path obswVersionDestPath;
|
||||
if(not sameChipAndCopy) {
|
||||
if (not sameChipAndCopy) {
|
||||
cmd << "xsc_mount_copy " << std::to_string(data[0]) << " " << std::to_string(data[1]);
|
||||
result = system(cmd.str().c_str());
|
||||
if (result != 0) {
|
||||
|
@ -532,7 +532,6 @@ void initmission::createTestTasks(TaskFactory& factory,
|
||||
#endif // OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
▄ ▄
|
||||
▌▒█ ▄▀▒▌
|
||||
|
@ -553,9 +553,9 @@ void SdCardManager::setActiveSdCard(sd::SdCard sdCard) {
|
||||
MutexGuard mg(mutex);
|
||||
sdInfo.active = sdCard;
|
||||
if (sdInfo.active == sd::SdCard::SLOT_0) {
|
||||
currentPrefix = SD_0_MOUNT_POINT;
|
||||
currentPrefix = config::SD_0_MOUNT_POINT;
|
||||
} else {
|
||||
currentPrefix = SD_1_MOUNT_POINT;
|
||||
currentPrefix = config::SD_1_MOUNT_POINT;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ void PayloadPcduHandler::checkAdcValues() {
|
||||
void PayloadPcduHandler::checkJsonFileInit() {
|
||||
if (not jsonFileInitComplete) {
|
||||
auto activeSd = sdcMan->getActiveSdCard();
|
||||
if (activeSd and sdcMan->isSdCardMounted(activeSd.value())) {
|
||||
if (activeSd and sdcMan->isSdCardUsable(activeSd.value())) {
|
||||
params.initialize(sdcMan->getCurrentMountPrefix());
|
||||
jsonFileInitComplete = true;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <optional>
|
||||
|
||||
#include "commonSubsystemIds.h"
|
||||
#include "eive/eventSubsystemIds.h"
|
||||
|
||||
class SdCardMountedIF;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef 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/events/Event.h>
|
||||
|
||||
|
@ -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_PARAM_SIZE = 0x1B;
|
||||
|
||||
}
|
||||
} // namespace gsConstants
|
||||
|
||||
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GOMSPACEDEFINES_H_ */
|
||||
|
@ -10,7 +10,7 @@ class SdCardMountedIF {
|
||||
public:
|
||||
virtual ~SdCardMountedIF(){};
|
||||
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 void setActiveSdCard(sd::SdCard sdCard) = 0;
|
||||
virtual std::optional<sd::SdCard> getActiveSdCard() const = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user