Skip to content

Commit

Permalink
PR #13070 from remibettan: sensor_ts_correction
Browse files Browse the repository at this point in the history
Fix metadata for D500 device to take from the correct structure
  • Loading branch information
remibettan committed Jun 23, 2024
2 parents 5af61fb + cc12887 commit 52129b4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/ds/d500/d500-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,19 +561,19 @@ namespace librealsense
auto md_prop_offset = metadata_raw_mode_offset +
offsetof(md_depth_mode, depth_y_mode) +
offsetof(md_depth_y_normal_mode, intel_capture_timing);

// attributes of md_capture_stats
auto md_prop_offset_stats = metadata_raw_mode_offset +
offsetof(md_depth_mode, depth_y_mode) +
offsetof(md_depth_y_normal_mode, intel_capture_stats);

depth_sensor.register_metadata(RS2_FRAME_METADATA_FRAME_COUNTER, make_attribute_parser(&md_capture_timing::frame_counter, md_capture_timing_attributes::frame_counter_attribute, md_prop_offset));
depth_sensor.register_metadata(RS2_FRAME_METADATA_SENSOR_TIMESTAMP,
make_rs400_sensor_ts_parser(make_attribute_parser(&md_capture_stats::hw_timestamp, md_capture_stat_attributes::hw_timestamp_attribute, md_prop_offset),
make_rs400_sensor_ts_parser(make_attribute_parser(&md_capture_stats::hw_timestamp, md_capture_stat_attributes::hw_timestamp_attribute, md_prop_offset_stats),
make_attribute_parser(&md_capture_timing::sensor_timestamp, md_capture_timing_attributes::sensor_timestamp_attribute, md_prop_offset)));

// attributes of md_capture_stats
md_prop_offset = metadata_raw_mode_offset +
offsetof(md_depth_mode, depth_y_mode) +
offsetof(md_depth_y_normal_mode, intel_capture_stats);

depth_sensor.register_metadata(RS2_FRAME_METADATA_FRAME_TIMESTAMP, make_attribute_parser(&md_capture_stats::hw_timestamp, md_capture_stat_attributes::hw_timestamp_attribute, md_prop_offset));
depth_sensor.register_metadata(RS2_FRAME_METADATA_WHITE_BALANCE, make_attribute_parser(&md_capture_stats::white_balance, md_capture_stat_attributes::white_balance_attribute, md_prop_offset));
depth_sensor.register_metadata(RS2_FRAME_METADATA_FRAME_TIMESTAMP, make_attribute_parser(&md_capture_stats::hw_timestamp, md_capture_stat_attributes::hw_timestamp_attribute, md_prop_offset_stats));
depth_sensor.register_metadata(RS2_FRAME_METADATA_WHITE_BALANCE, make_attribute_parser(&md_capture_stats::white_balance, md_capture_stat_attributes::white_balance_attribute, md_prop_offset_stats));

// attributes of md_depth_control
md_prop_offset = metadata_raw_mode_offset +
Expand Down

0 comments on commit 52129b4

Please sign in to comment.