more improvements and bugfixes
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
This commit is contained in:
parent
0e6d2dc79b
commit
cae76e17f5
@ -85,7 +85,7 @@ void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
|
|||||||
}
|
}
|
||||||
} else if (opCode == OpCode::PARSE_TM) {
|
} else if (opCode == OpCode::PARSE_TM) {
|
||||||
for (auto& activeCmd : activeActionCmds) {
|
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) {
|
if (activeCmd.second.commandedBy != MessageQueueIF::NO_QUEUE) {
|
||||||
actionHelper.finish(false, activeCmd.second.commandedBy, activeCmd.first,
|
actionHelper.finish(false, activeCmd.second.commandedBy, activeCmd.first,
|
||||||
DeviceHandlerIF::TIMEOUT);
|
DeviceHandlerIF::TIMEOUT);
|
||||||
@ -238,6 +238,11 @@ ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueI
|
|||||||
default:
|
default:
|
||||||
break;
|
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)) {
|
if (isCommandAlreadyActive(actionId)) {
|
||||||
return HasActionsIF::IS_BUSY;
|
return HasActionsIF::IS_BUSY;
|
||||||
}
|
}
|
||||||
@ -543,8 +548,9 @@ ReturnValue_t FreshSupvHandler::sendCommand(DeviceCommandId_t commandId, TcBase&
|
|||||||
auto activeCmdIter =
|
auto activeCmdIter =
|
||||||
activeActionCmds.find(buildActiveCmdKey(tc.getModuleApid(), tc.getServiceId()));
|
activeActionCmds.find(buildActiveCmdKey(tc.getModuleApid(), tc.getServiceId()));
|
||||||
if (activeCmdIter == activeActionCmds.end()) {
|
if (activeCmdIter == activeActionCmds.end()) {
|
||||||
|
info.isPending = true;
|
||||||
|
info.replyPacketExpected = replyExpected;
|
||||||
activeActionCmds.emplace(buildActiveCmdKey(tc.getModuleApid(), tc.getServiceId()), info);
|
activeActionCmds.emplace(buildActiveCmdKey(tc.getModuleApid(), tc.getServiceId()), info);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (activeCmdIter->second.isPending) {
|
if (activeCmdIter->second.isPending) {
|
||||||
return HasActionsIF::IS_BUSY;
|
return HasActionsIF::IS_BUSY;
|
||||||
|
@ -1061,6 +1061,7 @@ ReturnValue_t PlocSupvUartManager::parseRecRingBufForHdlc(size_t& readSize, size
|
|||||||
triggerEvent(HDLC_CRC_ERROR);
|
triggerEvent(HDLC_CRC_ERROR);
|
||||||
}
|
}
|
||||||
if (retval != 0) {
|
if (retval != 0) {
|
||||||
|
readSize = ++idx;
|
||||||
return HDLC_ERROR;
|
return HDLC_ERROR;
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user