Commit a626cd33 authored by Lauros Pajunen's avatar Lauros Pajunen
Browse files

Increment buffer after each ISM read

parent 29be5676
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -908,7 +908,7 @@ static ivas_error unpackISMPositionCompact( const uint8_t *buffer, uint32_t numD

    for ( n = 0; n < ism_position->numObjects; n++ )
    {
        compactRead = ( (int32_t) buffer[0] << 24 ) | ( (int32_t) buffer[1] << 16 ) | ( (int32_t) buffer[2] << 8 ) | ( (int32_t) buffer[3] );
        compactRead = ( (int32_t) buffer[n*4] << 24 ) | ( (int32_t) buffer[n*4 + 1] << 16 ) | ( (int32_t) buffer[n*4 + 2] << 8 ) | ( (int32_t) buffer[n*4 + 3] );
        ism_position->position[n].x = FLOAT_FROM_Q10( (int16_t) ( compactRead >> 21 ) ) * MAX_PI_COMPACT_POSITION_XY_METERS; /* Shift preserves sign bit */
        compactRead = compactRead << 11;                                                                                     /* Discard read bits */
        ism_position->position[n].y = FLOAT_FROM_Q10( (int16_t) ( compactRead >> 21 ) ) * MAX_PI_COMPACT_POSITION_XY_METERS; /* Shift preserves sign bit */