more robust sp creator len setter
This commit is contained in:
parent
c5ec984d0b
commit
9fafccd6f1
@ -43,9 +43,10 @@ ReturnValue_t SpacePacketCreator::serialize(uint8_t **buffer, size_t *size, size
|
||||
|
||||
void SpacePacketCreator::setCcsdsLenFromTotalDataFieldLen(size_t actualLength) {
|
||||
if (actualLength == 0) {
|
||||
return;
|
||||
setDataLenField(actualLength);
|
||||
} else {
|
||||
setDataLenField(actualLength - 1);
|
||||
}
|
||||
setDataLenField(actualLength - 1);
|
||||
}
|
||||
size_t SpacePacketCreator::getSerializedSize() const { return ccsds::HEADER_LEN; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user