diff --git a/src/ds/ds-private.h b/src/ds/ds-private.h index ca3eaa8de17..c9a86110703 100644 --- a/src/ds/ds-private.h +++ b/src/ds/ds-private.h @@ -524,6 +524,7 @@ 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, @@ -531,8 +532,8 @@ namespace librealsense 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, diff --git a/src/ds/ds5/ds5-device.cpp b/src/ds/ds5/ds5-device.cpp index e80f57972a6..9de03ee579b 100644 --- a/src/ds/ds5/ds5-device.cpp +++ b/src/ds/ds5/ds5-device.cpp @@ -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; } @@ -695,8 +695,11 @@ namespace librealsense std::make_shared(_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) { @@ -704,7 +707,7 @@ namespace librealsense } 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) {