and were at DHB debugging again
All checks were successful
EIVE/eive-obsw/pipeline/pr-v2.1.0-dev This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-v2.1.0-dev This commit looks good
This commit is contained in:
parent
4887dc9e6b
commit
714e2d07e5
@ -225,9 +225,9 @@ void PlocMPSoCHandler::doShutDown() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
ReturnValue_t PlocMPSoCHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
||||||
if (not normalCmdPending) {
|
if (not commandIsExecuting(mpsoc::TC_GET_HK_REPORT)) {
|
||||||
*id = mpsoc::TC_GET_HK_REPORT;
|
*id = mpsoc::TC_GET_HK_REPORT;
|
||||||
normalCmdPending = true;
|
// normalCmdPending = true;
|
||||||
return buildCommandFromCommand(*id, nullptr, 0);
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
}
|
}
|
||||||
return NOTHING_TO_SEND;
|
return NOTHING_TO_SEND;
|
||||||
@ -424,6 +424,7 @@ ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remain
|
|||||||
triggerEvent(MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH, sequenceCount, recvSeqCnt);
|
triggerEvent(MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH, sequenceCount, recvSeqCnt);
|
||||||
sequenceCount = recvSeqCnt;
|
sequenceCount = recvSeqCnt;
|
||||||
}
|
}
|
||||||
|
sif::debug << "sequence count: " << sequenceCount.get() << std::endl;
|
||||||
// This sequence count ping pong does not make any sense but it is how the MPSoC expects it.
|
// This sequence count ping pong does not make any sense but it is how the MPSoC expects it.
|
||||||
sequenceCount++;
|
sequenceCount++;
|
||||||
return result;
|
return result;
|
||||||
@ -804,19 +805,22 @@ ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) {
|
|||||||
|
|
||||||
uint16_t apid = (*(data) << 8 | *(data + 1)) & APID_MASK;
|
uint16_t apid = (*(data) << 8 | *(data + 1)) & APID_MASK;
|
||||||
|
|
||||||
auto cmdDoneHandler = [&]() {
|
auto cmdDoneHandler = [&](bool success) {
|
||||||
if (normalCmdPending) {
|
if (normalCmdPending) {
|
||||||
normalCmdPending = false;
|
normalCmdPending = false;
|
||||||
}
|
}
|
||||||
auto commandIter = deviceCommandMap.find(getPendingCommand());
|
auto commandIter = deviceCommandMap.find(getPendingCommand());
|
||||||
if (commandIter != deviceCommandMap.end()) {
|
if (commandIter != deviceCommandMap.end()) {
|
||||||
commandIter->second.isExecuting = false;
|
commandIter->second.isExecuting = false;
|
||||||
|
if (commandIter->second.sendReplyTo != MessageQueueIF::NO_QUEUE) {
|
||||||
|
actionHelper.finish(success, commandIter->second.sendReplyTo, getPendingCommand(), result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
disableAllReplies();
|
disableAllReplies();
|
||||||
};
|
};
|
||||||
switch (apid) {
|
switch (apid) {
|
||||||
case (mpsoc::apid::EXE_SUCCESS): {
|
case (mpsoc::apid::EXE_SUCCESS): {
|
||||||
cmdDoneHandler();
|
cmdDoneHandler(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (mpsoc::apid::EXE_FAILURE): {
|
case (mpsoc::apid::EXE_FAILURE): {
|
||||||
@ -833,7 +837,7 @@ ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) {
|
|||||||
printStatus(data);
|
printStatus(data);
|
||||||
sendFailureReport(mpsoc::EXE_REPORT, MPSoCReturnValuesIF::RECEIVED_EXE_FAILURE);
|
sendFailureReport(mpsoc::EXE_REPORT, MPSoCReturnValuesIF::RECEIVED_EXE_FAILURE);
|
||||||
result = IGNORE_REPLY_DATA;
|
result = IGNORE_REPLY_DATA;
|
||||||
cmdDoneHandler();
|
cmdDoneHandler(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
Loading…
Reference in New Issue
Block a user