From 0a38d2e22d75fdfc6b2ea40449eb706055246b03 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 27 Jul 2022 17:56:16 +0200 Subject: [PATCH] small bugfix --- src/fsfw/tmtcpacket/pus/tm/PusTmZcWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fsfw/tmtcpacket/pus/tm/PusTmZcWriter.cpp b/src/fsfw/tmtcpacket/pus/tm/PusTmZcWriter.cpp index 47bb749f..bcbdba03 100644 --- a/src/fsfw/tmtcpacket/pus/tm/PusTmZcWriter.cpp +++ b/src/fsfw/tmtcpacket/pus/tm/PusTmZcWriter.cpp @@ -10,8 +10,9 @@ void PusTmZeroCopyWriter::setSequenceCount(uint16_t seqCount) { reinterpret_cast(const_cast((pointers.spHeaderStart))); ccsds::setSequenceCount(*spHeader, seqCount); } + void PusTmZeroCopyWriter::updateErrorControl() { - auto* crcStart = reinterpret_cast(const_cast((pointers.spHeaderStart))); + auto* crcStart = const_cast((pointers.crcStart)); uint16_t crc16 = CRC::crc16ccitt(PusTmReader::getFullData(), getFullPacketLen() - sizeof(ecss::PusChecksumT)); crcStart[0] = (crc16 >> 8) & 0xff;