Bugfix in sending of measurement data
This commit is contained in:
parent
e057d97a70
commit
210c7b9cdc
|
@ -92,7 +92,10 @@ private:
|
|||
"serializeChunk: invalid startIdx" );
|
||||
|
||||
if( startIdx >= currentChunk->getStartIndex() ) {
|
||||
encoder.sendArrayPartialContents( currentChunk->getDataPointer(), currentChunk->numMeasurements() );
|
||||
const auto localStartIdx = startIdx - currentChunk->getStartIndex();
|
||||
const auto numElements = currentChunk->numMeasurements() - localStartIdx;
|
||||
assert(numElements <= currentChunk->numMeasurements(), "Internal problem in serializeChunk");
|
||||
encoder.sendArrayPartialContents( currentChunk->getDataPointer() + localStartIdx, numElements );
|
||||
return currentChunk->getStartIndex() + currentChunk->numMeasurements();
|
||||
} else if( startIdx >= otherChunk->getStartIndex() && otherChunkFilled() ) {
|
||||
encoder.sendArrayPartialContents( otherChunk->getDataPointer(), otherChunk->numMeasurements() );
|
||||
|
|
Loading…
Reference in New Issue