more improvements and bugfixes
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit Details

This commit is contained in:
Robin Müller 2023-11-15 14:38:09 +01:00
parent 0e6d2dc79b
commit cae76e17f5
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 9 additions and 2 deletions

View File

@ -85,7 +85,7 @@ void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
}
} else if (opCode == OpCode::PARSE_TM) {
for (auto& activeCmd : activeActionCmds) {
if (activeCmd.second.cmdCountdown.hasTimedOut()) {
if (activeCmd.second.isPending and activeCmd.second.cmdCountdown.hasTimedOut()) {
if (activeCmd.second.commandedBy != MessageQueueIF::NO_QUEUE) {
actionHelper.finish(false, activeCmd.second.commandedBy, activeCmd.first,
DeviceHandlerIF::TIMEOUT);
@ -238,6 +238,11 @@ ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueI
default:
break;
}
// This might not be necessary, but I think the PLOC SUPV is not able to process multiple
// commands consecutively..
if (isCommandPending()) {
return HasActionsIF::IS_BUSY;
}
if (isCommandAlreadyActive(actionId)) {
return HasActionsIF::IS_BUSY;
}
@ -543,8 +548,9 @@ ReturnValue_t FreshSupvHandler::sendCommand(DeviceCommandId_t commandId, TcBase&
auto activeCmdIter =
activeActionCmds.find(buildActiveCmdKey(tc.getModuleApid(), tc.getServiceId()));
if (activeCmdIter == activeActionCmds.end()) {
info.isPending = true;
info.replyPacketExpected = replyExpected;
activeActionCmds.emplace(buildActiveCmdKey(tc.getModuleApid(), tc.getServiceId()), info);
} else {
if (activeCmdIter->second.isPending) {
return HasActionsIF::IS_BUSY;

View File

@ -1061,6 +1061,7 @@ ReturnValue_t PlocSupvUartManager::parseRecRingBufForHdlc(size_t& readSize, size
triggerEvent(HDLC_CRC_ERROR);
}
if (retval != 0) {
readSize = ++idx;
return HDLC_ERROR;
}
return returnvalue::OK;