hopefully last bugfix
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -107,10 +107,7 @@ class SpTmReader : public SpacePacketReader {
|
||||
uint16_t getPayloadDataLength() { return getPacketDataLen() - 2; }
|
||||
|
||||
ReturnValue_t checkCrc() {
|
||||
const uint8_t* crcPtr = getFullData() + getFullPacketLen() - CRC_SIZE;
|
||||
uint16_t receivedCrc = *(crcPtr) << 8 | *(crcPtr + 1);
|
||||
uint16_t recalculatedCrc = CRC::crc16ccitt(getFullData(), getFullPacketLen() - CRC_SIZE);
|
||||
if (recalculatedCrc != receivedCrc) {
|
||||
if (CRC::crc16ccitt(getFullData(), getFullPacketLen()) != 0) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
|
Reference in New Issue
Block a user