check TM before normal periodic OP
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit Details

This commit is contained in:
Robin Müller 2023-11-21 17:37:26 +01:00
parent 1176c4397d
commit 73ed59928e
3 changed files with 14 additions and 5 deletions

2
fsfw

@ -1 +1 @@
Subproject commit 41d67bff639192afa2e18a23db6801c75b4fea88
Subproject commit 0021aa29f54838a21658dbbaca98fe0e54318d8a

View File

@ -74,7 +74,8 @@ void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
}
} else {
// I think the SUPV is not able to process multiple commands consecutively, so only send
// normal command if no other command is pending.
// normal command if no other command is pending. We handle the action queue first, which
// should ensure that these commands take precendence.
if (mode == MODE_NORMAL and not isCommandPending()) {
auto cmdIter = activeActionCmds.find(
buildActiveCmdKey(Apid::HK, static_cast<uint8_t>(tc::HkId::GET_REPORT)));
@ -101,6 +102,15 @@ void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
}
}
ReturnValue_t FreshSupvHandler::performDeviceOperationPreQueueHandling(uint8_t opCode) {
if (opCode != OpCode::DEFAULT_OPERATION) {
return returnvalue::OK;
}
// We parse for TM packets shortly before handling the queue, this might complete some packets,
// which then allows the handling of new action commands.
return parseTmPackets();
}
ReturnValue_t FreshSupvHandler::handleCommandMessage(CommandMessage* message) {
// No custom messages.
return returnvalue::FAILED;
@ -254,6 +264,7 @@ ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueI
return HasActionsIF::IS_BUSY;
}
spParams.buf = commandBuffer.data();
this->commandedByCached = commandedBy;
switch (actionId) {
case GET_HK_REPORT: {
sendEmptyCmd(supv::GET_HK_REPORT, Apid::HK, static_cast<uint8_t>(tc::HkId::GET_REPORT), true);
@ -395,9 +406,6 @@ ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueI
result = DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
break;
}
if (result == returnvalue::OK) {
this->commandedByCached = commandedBy;
}
return result;
}

View File

@ -57,6 +57,7 @@ class FreshSupvHandler : public FreshDeviceHandlerBase {
*/
void startTransition(Mode_t newMode, Submode_t submode) override;
ReturnValue_t performDeviceOperationPreQueueHandling(uint8_t opCode) override;
void handleTransitionToOn();
void handleTransitionToOff();