Skip to content

Commit

Permalink
used gvd version flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamir91 committed Feb 7, 2023
1 parent c719abd commit 3c9f58a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/ds/ds-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -524,15 +524,16 @@ namespace librealsense
enum gvd_fields
{
// Keep sorted
gvd_version_offset = 2,
camera_fw_version_offset = 12,
is_camera_locked_offset = 25,
module_serial_offset = 48,
module_asic_serial_offset = 64,
fisheye_sensor_lb = 112,
fisheye_sensor_hb = 113,
imu_acc_chip_id = 124,
ip65_sealed = 161,
filter_sensor = 164,
ip65_sealed_offset = 161,
filter_sensor_offset = 164,
depth_sensor_type = 166,
active_projector = 170,
rgb_sensor = 174,
Expand Down
11 changes: 7 additions & 4 deletions src/ds/ds5/ds5-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,9 @@ namespace librealsense
// Option INTER_CAM_SYNC_MODE is not enabled in D405
if (_pid != ds::RS405_PID)
val |= d400_caps::CAP_INTERCAM_HW_SYNC;
if (gvd_buf[ip65_sealed] == 0x1)
if (gvd_buf[ip65_sealed_offset] == 0x1)
val |= d400_caps::CAP_IP65;
if (gvd_buf[filter_sensor] == 0x1)
if (gvd_buf[filter_sensor_offset] == 0x1)
val |= d400_caps::CAP_IR_FILTER;
return val;
}
Expand Down Expand Up @@ -695,16 +695,19 @@ namespace librealsense
std::make_shared<thermal_compensation>(_thermal_monitor,thermal_compensation_toggle));
}

auto const CUR_GVD_VERSION = gvd_buff[gvd_version_offset];
auto const MIN_GVD_VERSION = 0x4;

auto ir_filter_mask = d400_caps::CAP_IR_FILTER;
if (_fw_version >= firmware_version("5.15.0.0") &&
if (MIN_GVD_VERSION <= CUR_GVD_VERSION &&
val_in_range(_pid, {RS435_RGB_PID, RS435I_PID, RS455_PID}) &&
(_device_capabilities & ir_filter_mask) == ir_filter_mask)
{
device_name += "F";
}

auto ip65_mask = d400_caps::CAP_IP65;
if (_fw_version >= firmware_version("5.15.0.0") &&
if (MIN_GVD_VERSION <= CUR_GVD_VERSION &&
val_in_range(_pid, { RS455_PID }) &&
(_device_capabilities & ip65_mask) == ip65_mask)
{
Expand Down

0 comments on commit 3c9f58a

Please sign in to comment.