fixed the bug
EIVE/eive-obsw/pipeline/pr-main This commit looks good Details

This commit is contained in:
Robin Müller 2024-04-30 15:11:21 +02:00
parent de75fc5531
commit acd02376c4
3 changed files with 14 additions and 6 deletions

2
fsfw

@ -1 +1 @@
Subproject commit 6381d9a83c439b1b092412dc4d59c1f515d236e7
Subproject commit 42867ad0cba088ab1cb6cb672d001f991f7e4a60

View File

@ -30,7 +30,7 @@ ReturnValue_t MpsocCommunication::parseAndRetrieveNextPacket() {
return returnvalue::OK;
}
readRingBuf.readData(readBuf, availableReadData);
spReader.setReadOnlyData(readBuf, availableReadData);
spReader.setReadOnlyData(readBuf, sizeof(readBuf));
auto res = spReader.checkSize();
if (res != returnvalue::OK) {
return res;

View File

@ -6,6 +6,7 @@
#include <filesystem>
#include <fstream>
#include "fsfw/serviceinterface/ServiceInterfacePrinter.h"
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
#include "fsfw/tmtcpacket/ccsds/SpacePacketReader.h"
#include "linux/payload/MpsocCommunication.h"
@ -64,7 +65,8 @@ ReturnValue_t PlocMpsocSpecialComHelper::performOperation(uint8_t operationCode)
if (result == returnvalue::OK) {
triggerEvent(MPSOC_FLASH_READ_SUCCESSFUL, txSequenceCount.get());
} else {
triggerEvent(MPSOC_FLASH_READ_FAILED, txSequenceCount.get());
sif::printWarning("PLOC MPSoC Helper: Flash read failed with code %04x\n", result);
triggerEvent(MPSOC_FLASH_READ_FAILED, txSequenceCount.get(), result);
}
internalState = InternalState::IDLE;
break;
@ -393,14 +395,20 @@ ReturnValue_t PlocMpsocSpecialComHelper::handleTmReception() {
return returnvalue::FAILED;
}
result = tryReceiveNextReply();
if (result != MpsocCommunication::PACKET_RECEIVED and result != returnvalue::OK) {
return result;
}
if (result == MpsocCommunication::PACKET_RECEIVED) {
// Need to convert this, we are faking a synchronous API here.
result = returnvalue::OK;
break;
}
if (result != returnvalue::OK) {
if (result == MpsocCommunication::FAULTY_PACKET_SIZE) {
sif::printWarning("PLOC MPSoC Helper: retrieving next reply failed: faulty packet size\n");
} else if (result == MpsocCommunication::CRC_CHECK_FAILED) {
sif::printWarning("PLOC MPSoC Helper: retrieving next reply failed: CRC check failed\n");
}
sif::printWarning("PLOC MPSoC Helper: retrieving next reply failed with code %d\n", result);
return result;
}
usleep(usleepDelay);
if (usleepDelay < 200000) {
usleepDelay *= 4;