Skip to content

Commit

Permalink
set stream_type hold the value itself
Browse files Browse the repository at this point in the history
  • Loading branch information
noacoohen committed May 29, 2024
1 parent c3d6019 commit e84c78d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/uvc-sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ void uvc_sensor::open( const stream_profiles & requests )
expected_size = 64; // 32; // D457 - WORKAROUND - SHOULD BE REMOVED AFTER CORRECTION IN DRIVER
//Motion stream on uvc is used only for mipi. Stream frame number counts gyro and accel together.
//We override it using 2 seperate counters.
auto stream_type = (uint8_t *)f.pixels;
if( stream_type[0] == 1 ) // 1 == Accel
auto stream_type = ((uint8_t *)f.pixels)[0];
if( stream_type == 1 ) // 1 == Accel
fr->additional_data.frame_number = ++_accel_counter;
else if( stream_type[0] == 2 ) // 2 == Gyro
else if( stream_type == 2 ) // 2 == Gyro
fr->additional_data.frame_number = ++_gyro_counter;
frame_counter = fr->additional_data.frame_number;
}
Expand Down

0 comments on commit e84c78d

Please sign in to comment.