This commit is contained in:
parent
de75fc5531
commit
acd02376c4
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 6381d9a83c439b1b092412dc4d59c1f515d236e7
|
Subproject commit 42867ad0cba088ab1cb6cb672d001f991f7e4a60
|
@ -30,7 +30,7 @@ ReturnValue_t MpsocCommunication::parseAndRetrieveNextPacket() {
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
readRingBuf.readData(readBuf, availableReadData);
|
readRingBuf.readData(readBuf, availableReadData);
|
||||||
spReader.setReadOnlyData(readBuf, availableReadData);
|
spReader.setReadOnlyData(readBuf, sizeof(readBuf));
|
||||||
auto res = spReader.checkSize();
|
auto res = spReader.checkSize();
|
||||||
if (res != returnvalue::OK) {
|
if (res != returnvalue::OK) {
|
||||||
return res;
|
return res;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
#include "fsfw/serviceinterface/ServiceInterfacePrinter.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
|
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
|
||||||
#include "fsfw/tmtcpacket/ccsds/SpacePacketReader.h"
|
#include "fsfw/tmtcpacket/ccsds/SpacePacketReader.h"
|
||||||
#include "linux/payload/MpsocCommunication.h"
|
#include "linux/payload/MpsocCommunication.h"
|
||||||
@ -64,7 +65,8 @@ ReturnValue_t PlocMpsocSpecialComHelper::performOperation(uint8_t operationCode)
|
|||||||
if (result == returnvalue::OK) {
|
if (result == returnvalue::OK) {
|
||||||
triggerEvent(MPSOC_FLASH_READ_SUCCESSFUL, txSequenceCount.get());
|
triggerEvent(MPSOC_FLASH_READ_SUCCESSFUL, txSequenceCount.get());
|
||||||
} else {
|
} 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;
|
internalState = InternalState::IDLE;
|
||||||
break;
|
break;
|
||||||
@ -393,14 +395,20 @@ ReturnValue_t PlocMpsocSpecialComHelper::handleTmReception() {
|
|||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
result = tryReceiveNextReply();
|
result = tryReceiveNextReply();
|
||||||
if (result != MpsocCommunication::PACKET_RECEIVED and result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
if (result == MpsocCommunication::PACKET_RECEIVED) {
|
if (result == MpsocCommunication::PACKET_RECEIVED) {
|
||||||
// Need to convert this, we are faking a synchronous API here.
|
// Need to convert this, we are faking a synchronous API here.
|
||||||
result = returnvalue::OK;
|
result = returnvalue::OK;
|
||||||
break;
|
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);
|
usleep(usleepDelay);
|
||||||
if (usleepDelay < 200000) {
|
if (usleepDelay < 200000) {
|
||||||
usleepDelay *= 4;
|
usleepDelay *= 4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user