copy paste fail

This commit is contained in:
Ulrich Mohr 2022-08-25 22:39:21 +02:00
parent 3260a03544
commit 3f8f17a66e

View File

@ -4,7 +4,7 @@
#include "fsfw/modes/HasModesIF.h" #include "fsfw/modes/HasModesIF.h"
#include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/serviceinterface/ServiceInterface.h"
ModeHelper::ModeHelper(HasModesIF* owner) ModeHelper::ModeHelper(HasModesIF *owner)
: commandedMode(HasModesIF::MODE_OFF), : commandedMode(HasModesIF::MODE_OFF),
commandedSubmode(HasModesIF::SUBMODE_NONE), commandedSubmode(HasModesIF::SUBMODE_NONE),
owner(owner), owner(owner),
@ -12,7 +12,7 @@ ModeHelper::ModeHelper(HasModesIF* owner)
ModeHelper::~ModeHelper() {} ModeHelper::~ModeHelper() {}
ReturnValue_t ModeHelper::handleModeCommand(CommandMessage* command) { ReturnValue_t ModeHelper::handleModeCommand(CommandMessage *command) {
CommandMessage reply; CommandMessage reply;
Mode_t mode; Mode_t mode;
Submode_t submode; Submode_t submode;
@ -108,7 +108,7 @@ bool ModeHelper::isForced() { return forced; }
void ModeHelper::setForced(bool forced) { this->forced = forced; } void ModeHelper::setForced(bool forced) { this->forced = forced; }
#ifdef FSFW_INTROSPECTION #ifdef FSFW_INTROSPECTION
std::vector<std::pair<Mode_t, const char *>> ModeHelper::getModes() const override { std::vector<std::pair<Mode_t, const char *>> ModeHelper::getModes() const {
std::vector<std::pair<Mode_t, const char *>> modeVector; std::vector<std::pair<Mode_t, const char *>> modeVector;
auto modeDefinitionHelper = owner->getModeDefinitionHelper(); auto modeDefinitionHelper = owner->getModeDefinitionHelper();
EnumIF *mode = modeDefinitionHelper.mode; EnumIF *mode = modeDefinitionHelper.mode;
@ -118,9 +118,9 @@ void ModeHelper::setForced(bool forced) { this->forced = forced; }
} }
modeDefinitionHelper.free(); modeDefinitionHelper.free();
return modeVector; return modeVector;
} }
std::vector<std::pair<Submode_t, const char *>> ModeHelper::getSubmodes(Mode_t mode) const override { std::vector<std::pair<Submode_t, const char *>> ModeHelper::getSubmodes(Mode_t mode) const {
auto modeDefinitionHelper = owner->getModeDefinitionHelper(); auto modeDefinitionHelper = owner->getModeDefinitionHelper();
EnumIF *submode = modeDefinitionHelper.submode; EnumIF *submode = modeDefinitionHelper.submode;
std::vector<std::pair<Submode_t, const char *>> submodeVector; std::vector<std::pair<Submode_t, const char *>> submodeVector;
@ -134,5 +134,5 @@ void ModeHelper::setForced(bool forced) { this->forced = forced; }
} }
modeDefinitionHelper.free(); modeDefinitionHelper.free();
return submodeVector; return submodeVector;
} }
#endif #endif