str assembly mode checks
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2023-04-05 15:05:32 +02:00
parent 858c6c301e
commit 0ade2ae0ee
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 13 additions and 4 deletions

View File

@ -54,9 +54,6 @@ class StarTrackerHandler : public DeviceHandlerBase {
Submode_t getInitialSubmode() override; Submode_t getInitialSubmode() override;
static const Submode_t SUBMODE_BOOTLOADER = 1;
static const Submode_t SUBMODE_FIRMWARE = 2;
protected: protected:
void doStartUp() override; void doStartUp() override;
void doShutDown() override; void doShutDown() override;

View File

@ -11,6 +11,9 @@
namespace startracker { namespace startracker {
static const Submode_t SUBMODE_BOOTLOADER = 1;
static const Submode_t SUBMODE_FIRMWARE = 2;
/** /**
* @brief Returns the frame type field of a decoded frame. * @brief Returns the frame type field of a decoded frame.
*/ */

View File

@ -2,6 +2,8 @@
#include <eive/objects.h> #include <eive/objects.h>
#include "mission/acs/str/strHelpers.h"
StrAssembly::StrAssembly(object_id_t objectId) : AssemblyBase(objectId) { StrAssembly::StrAssembly(object_id_t objectId) : AssemblyBase(objectId) {
ModeListEntry entry; ModeListEntry entry;
entry.setObject(objects::STAR_TRACKER); entry.setObject(objects::STAR_TRACKER);
@ -31,5 +33,12 @@ ReturnValue_t StrAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_t wan
} }
ReturnValue_t StrAssembly::isModeCombinationValid(Mode_t mode, Submode_t submode) { ReturnValue_t StrAssembly::isModeCombinationValid(Mode_t mode, Submode_t submode) {
if (mode == DeviceHandlerIF::MODE_NORMAL and submode != SUBMODE_NONE) {
return HasModesIF::INVALID_SUBMODE;
}
if (mode == MODE_ON and
(submode != startracker::SUBMODE_BOOTLOADER and submode != startracker::SUBMODE_FIRMWARE)) {
return HasModesIF::INVALID_SUBMODE;
}
return returnvalue::OK; return returnvalue::OK;
} }

2
tmtc

@ -1 +1 @@
Subproject commit 50668ca7a74edd4219456e393cd10f7858591130 Subproject commit dcf7d0af71f6ba9d569f9f56604e9245a0233427