add new parameter to skip SUPV commanding
Some checks failed
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit

This commit is contained in:
Robin Müller 2024-01-24 14:20:15 +01:00
parent 54187e47c1
commit 05b88dd294
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 26 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "fsfw/datapool/PoolReadGuard.h" #include "fsfw/datapool/PoolReadGuard.h"
#include "fsfw/globalfunctions/CRC.h" #include "fsfw/globalfunctions/CRC.h"
#include "fsfw/parameters/HasParametersIF.h"
PlocMpsocHandler::PlocMpsocHandler(object_id_t objectId, object_id_t uartComIFid, PlocMpsocHandler::PlocMpsocHandler(object_id_t objectId, object_id_t uartComIFid,
CookieIF* comCookie, PlocMpsocSpecialComHelper* plocMPSoCHelper, CookieIF* comCookie, PlocMpsocSpecialComHelper* plocMPSoCHelper,
@ -1395,6 +1396,9 @@ bool PlocMpsocHandler::handleHwStartup() {
return true; return true;
#endif #endif
if (powerState == PowerState::IDLE) { if (powerState == PowerState::IDLE) {
if (skipSupvCommandingToOn) {
powerState = PowerState::DONE;
}
if (supv::SUPV_ON) { if (supv::SUPV_ON) {
commandActionHelper.commandAction(supervisorHandler, supv::START_MPSOC); commandActionHelper.commandAction(supervisorHandler, supv::START_MPSOC);
supvTransitionCd.resetTimer(); supvTransitionCd.resetTimer();
@ -1532,3 +1536,19 @@ ReturnValue_t PlocMpsocHandler::checkModeCommand(Mode_t commandedMode, Submode_t
} }
return DeviceHandlerBase::checkModeCommand(commandedMode, commandedSubmode, msToReachTheMode); return DeviceHandlerBase::checkModeCommand(commandedMode, commandedSubmode, msToReachTheMode);
} }
ReturnValue_t PlocMpsocHandler::getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper* parameterWrapper,
const ParameterWrapper* newValues,
uint16_t startAtIndex) {
if (uniqueId == mpsoc::ParamId::SKIP_SUPV_ON_COMMANDING) {
uint8_t value = 0;
newValues->getElement(&value);
if (value > 1) {
return HasParametersIF::INVALID_VALUE;
}
parameterWrapper->set(skipSupvCommandingToOn);
}
return DeviceHandlerBase::getParameter(domainId, uniqueId, parameterWrapper, newValues,
startAtIndex);
}

View File

@ -201,6 +201,8 @@ class PlocMpsocHandler : public DeviceHandlerBase, public CommandsActionsIF {
PowerState powerState = PowerState::IDLE; PowerState powerState = PowerState::IDLE;
uint8_t skipSupvCommandingToOn = false;
/** /**
* @brief Handles events received from the PLOC MPSoC helper * @brief Handles events received from the PLOC MPSoC helper
*/ */

View File

@ -13,6 +13,10 @@
namespace mpsoc { namespace mpsoc {
enum ParamId: uint8_t {
SKIP_SUPV_ON_COMMANDING = 0x01
};
enum FileAccessModes : uint8_t { enum FileAccessModes : uint8_t {
// Opens a file, fails if the file does not exist. // Opens a file, fails if the file does not exist.
OPEN_EXISTING = 0x00, OPEN_EXISTING = 0x00,