small bugfix

This commit is contained in:
Robin Müller 2022-07-27 17:56:16 +02:00
parent 234ccdf764
commit 0a38d2e22d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -10,8 +10,9 @@ void PusTmZeroCopyWriter::setSequenceCount(uint16_t seqCount) {
reinterpret_cast<ccsds::PrimaryHeader*>(const_cast<uint8_t*>((pointers.spHeaderStart)));
ccsds::setSequenceCount(*spHeader, seqCount);
}
void PusTmZeroCopyWriter::updateErrorControl() {
auto* crcStart = reinterpret_cast<uint8_t*>(const_cast<uint8_t*>((pointers.spHeaderStart)));
auto* crcStart = const_cast<uint8_t*>((pointers.crcStart));
uint16_t crc16 =
CRC::crc16ccitt(PusTmReader::getFullData(), getFullPacketLen() - sizeof(ecss::PusChecksumT));
crcStart[0] = (crc16 >> 8) & 0xff;