copy paste fail
This commit is contained in:
parent
3260a03544
commit
3f8f17a66e
@ -4,7 +4,7 @@
|
||||
#include "fsfw/modes/HasModesIF.h"
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
|
||||
ModeHelper::ModeHelper(HasModesIF* owner)
|
||||
ModeHelper::ModeHelper(HasModesIF *owner)
|
||||
: commandedMode(HasModesIF::MODE_OFF),
|
||||
commandedSubmode(HasModesIF::SUBMODE_NONE),
|
||||
owner(owner),
|
||||
@ -12,7 +12,7 @@ ModeHelper::ModeHelper(HasModesIF* owner)
|
||||
|
||||
ModeHelper::~ModeHelper() {}
|
||||
|
||||
ReturnValue_t ModeHelper::handleModeCommand(CommandMessage* command) {
|
||||
ReturnValue_t ModeHelper::handleModeCommand(CommandMessage *command) {
|
||||
CommandMessage reply;
|
||||
Mode_t mode;
|
||||
Submode_t submode;
|
||||
@ -108,31 +108,31 @@ bool ModeHelper::isForced() { return forced; }
|
||||
void ModeHelper::setForced(bool forced) { this->forced = forced; }
|
||||
|
||||
#ifdef FSFW_INTROSPECTION
|
||||
std::vector<std::pair<Mode_t, const char *>> ModeHelper::getModes() const override {
|
||||
std::vector<std::pair<Mode_t, const char *>> modeVector;
|
||||
auto modeDefinitionHelper = owner->getModeDefinitionHelper();
|
||||
EnumIF *mode = modeDefinitionHelper.mode;
|
||||
for (size_t i = 0; i < mode->getSize(); i++) {
|
||||
modeVector.push_back(
|
||||
std::pair<Mode_t, const char *>(mode->getElements()[i], mode->getDescriptions()[i]));
|
||||
}
|
||||
modeDefinitionHelper.free();
|
||||
return modeVector;
|
||||
std::vector<std::pair<Mode_t, const char *>> ModeHelper::getModes() const {
|
||||
std::vector<std::pair<Mode_t, const char *>> modeVector;
|
||||
auto modeDefinitionHelper = owner->getModeDefinitionHelper();
|
||||
EnumIF *mode = modeDefinitionHelper.mode;
|
||||
for (size_t i = 0; i < mode->getSize(); i++) {
|
||||
modeVector.push_back(
|
||||
std::pair<Mode_t, const char *>(mode->getElements()[i], mode->getDescriptions()[i]));
|
||||
}
|
||||
modeDefinitionHelper.free();
|
||||
return modeVector;
|
||||
}
|
||||
|
||||
std::vector<std::pair<Submode_t, const char *>> ModeHelper::getSubmodes(Mode_t mode) const override {
|
||||
auto modeDefinitionHelper = owner->getModeDefinitionHelper();
|
||||
EnumIF *submode = modeDefinitionHelper.submode;
|
||||
std::vector<std::pair<Submode_t, const char *>> submodeVector;
|
||||
for (size_t i = 0; i < submode->getSize(); i++) {
|
||||
uint32_t ignored;
|
||||
if (owner->checkModeCommand(mode, submode->getElements()[i], &ignored) ==
|
||||
HasReturnvaluesIF::RETURN_OK) {
|
||||
submodeVector.push_back(std::pair<Submode_t, const char *>(submode->getElements()[i],
|
||||
submode->getDescriptions()[i]));
|
||||
}
|
||||
std::vector<std::pair<Submode_t, const char *>> ModeHelper::getSubmodes(Mode_t mode) const {
|
||||
auto modeDefinitionHelper = owner->getModeDefinitionHelper();
|
||||
EnumIF *submode = modeDefinitionHelper.submode;
|
||||
std::vector<std::pair<Submode_t, const char *>> submodeVector;
|
||||
for (size_t i = 0; i < submode->getSize(); i++) {
|
||||
uint32_t ignored;
|
||||
if (owner->checkModeCommand(mode, submode->getElements()[i], &ignored) ==
|
||||
HasReturnvaluesIF::RETURN_OK) {
|
||||
submodeVector.push_back(std::pair<Submode_t, const char *>(submode->getElements()[i],
|
||||
submode->getDescriptions()[i]));
|
||||
}
|
||||
modeDefinitionHelper.free();
|
||||
return submodeVector;
|
||||
}
|
||||
modeDefinitionHelper.free();
|
||||
return submodeVector;
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user