bugfix for crc check
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2024-04-17 11:24:29 +02:00
parent 449a8a4276
commit 9b9d8bd32f
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -42,7 +42,7 @@ ReturnValue_t MpsocCommunication::parseAndRetrieveNextPacket() {
// Might be split packet where the rest still has to be read.
return returnvalue::OK;
}
if (CRC::crc16ccitt(readBuf, availableReadData) != 0) {
if (CRC::crc16ccitt(readBuf, spReader.getFullPacketLen()) != 0) {
// Possibly invalid packet. We can not even trust the detected packet length.
// Just clear the whole read buffer as well.
readRingBuf.clear();