Skip to content

Commit

Permalink
Limit alternating laser to global shutter/emitter SKUs on
Browse files Browse the repository at this point in the history
Fix EOL discrepancy

Change-Id: If12bda3219a62fc1ef45080ceec021ef2f3621a3
  • Loading branch information
ev-mp committed Jan 16, 2019
1 parent a545870 commit 95bb545
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/ds5/ds5-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ namespace librealsense
val |= d400_caps::CAP_IMU_SENSOR;
if (0xFF != (gvd_buf[fisheye_sensor_lb] & gvd_buf[fisheye_sensor_hb]))
val |= d400_caps::CAP_FISHEYE_SENSOR;
if (0x1 == gvd_buf[depth_sensor_type])
val |= d400_caps::CAP_ROLLING_SHUTTER; // Standard depth
if (0x2 == gvd_buf[depth_sensor_type])
val |= d400_caps::CAP_GLOBAL_SHUTTER; // Wide depth

return val;
}
Expand Down Expand Up @@ -464,7 +468,9 @@ namespace librealsense
RS2_OPTION_ASIC_TEMPERATURE));
}

if (_fw_version >= firmware_version("5.11.0.44"))
// Alternating laser pattern is applicable for global shutter/active SKUs
auto mask = d400_caps::CAP_GLOBAL_SHUTTER | d400_caps::CAP_ACTIVE_PROJECTOR;
if ((_fw_version >= firmware_version("5.11.0.44")) && ((_device_capabilities & mask) == mask))
{
depth_ep.register_option(RS2_OPTION_EMITTER_ON_OFF, std::make_shared<alternating_emitter_option>(*_hw_monitor, &depth_ep));
}
Expand Down
10 changes: 8 additions & 2 deletions src/ds5/ds5-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ namespace librealsense
CAP_RGB_SENSOR = (1u << 1), // Dedicated RGB sensor
CAP_FISHEYE_SENSOR = (1u << 2), // TM1
CAP_IMU_SENSOR = (1u << 3),
CAP_GLOBAL_SHUTTER = (1u << 4),
CAP_ROLLING_SHUTTER = (1u << 5),
CAP_MAX
};

Expand All @@ -208,7 +210,9 @@ namespace librealsense
{ d400_caps::CAP_ACTIVE_PROJECTOR, "Active Projector" },
{ d400_caps::CAP_RGB_SENSOR, "RGB Sensor" },
{ d400_caps::CAP_FISHEYE_SENSOR, "Fisheye Sensor" },
{ d400_caps::CAP_IMU_SENSOR, "IMU Sensor" }
{ d400_caps::CAP_IMU_SENSOR, "IMU Sensor" },
{ d400_caps::CAP_GLOBAL_SHUTTER, "Global Shutter" },
{ d400_caps::CAP_ROLLING_SHUTTER, "Rolling Shutter" }
};

inline d400_caps operator &(const d400_caps lhs, const d400_caps rhs)
Expand All @@ -229,7 +233,8 @@ namespace librealsense
inline std::ostream& operator <<(std::ostream& stream, const d400_caps& cap)
{
for (auto i : { d400_caps::CAP_ACTIVE_PROJECTOR,d400_caps::CAP_RGB_SENSOR,
d400_caps::CAP_FISHEYE_SENSOR, d400_caps::CAP_IMU_SENSOR})
d400_caps::CAP_FISHEYE_SENSOR, d400_caps::CAP_IMU_SENSOR,
d400_caps::CAP_GLOBAL_SHUTTER, d400_caps::CAP_ROLLING_SHUTTER })
{
if (i==(i&cap))
stream << d400_capabilities_names.at(i) << " ";
Expand Down Expand Up @@ -523,6 +528,7 @@ namespace librealsense
module_serial_offset = 48,
fisheye_sensor_lb = 112,
fisheye_sensor_hb = 113,
depth_sensor_type = 166,
active_projector = 170,
rgb_sensor = 174,
imu_sensor = 178,
Expand Down

0 comments on commit 95bb545

Please sign in to comment.