acsCtrl does not allow ON or NORMAL anymore
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Marius Eggert 2023-03-10 12:11:10 +01:00
parent b1c4241b03
commit 170976566b
2 changed files with 14 additions and 8 deletions

View File

@ -10,12 +10,12 @@ namespace acs {
enum AcsMode : Mode_t {
OFF = HasModesIF::MODE_OFF,
SAFE = 10,
DETUMBLE = 11,
PTG_IDLE = 12,
PTG_NADIR = 13,
PTG_TARGET = 14,
PTG_TARGET_GS = 15,
PTG_INERTIAL = 16,
PTG_IDLE = 11,
PTG_NADIR = 12,
PTG_TARGET = 13,
PTG_TARGET_GS = 14,
PTG_INERTIAL = 15,
DETUMBLE = 20,
};
// static constexpr uint8_t ACS_SYSTEM_DETUMBLE_SUBMODE = 1;

View File

@ -639,8 +639,14 @@ ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode,
} else {
return INVALID_SUBMODE;
}
} else if ((mode == MODE_ON) || (mode == MODE_NORMAL)) {
if ((submode < acs::AcsMode::SAFE) or (submode > acs::AcsMode::PTG_INERTIAL)) {
} else if (not((mode < acs::AcsMode::SAFE) or (mode > acs::AcsMode::PTG_INERTIAL))) {
if (mode == acs::AcsMode::SAFE) {
if (not((submode == SUBMODE_NONE) or (submode == acs::AcsMode::DETUMBLE))) {
return INVALID_SUBMODE;
} else {
return returnvalue::OK;
}
} else if (not(submode == SUBMODE_NONE)) {
return INVALID_SUBMODE;
} else {
return returnvalue::OK;