Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix L515 GVD fields for SN & lock status #7203

Merged
merged 2 commits into from
Sep 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/l500/l500-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,13 @@ namespace librealsense
_hw_monitor->get_gvd(gvd_buff.size(), gvd_buff.data(), GVD);

auto optic_serial = _hw_monitor->get_module_serial_string(gvd_buff, module_serial_offset, module_serial_size);
auto asic_serial = _hw_monitor->get_module_serial_string(gvd_buff, module_asic_serial_offset, module_serial_size);
auto asic_serial = _hw_monitor->get_module_serial_string(gvd_buff, module_asic_serial_offset, module_asic_serial_size);
auto fwv = _hw_monitor->get_firmware_version_string(gvd_buff, fw_version_offset);
_fw_version = firmware_version(fwv);
firmware_version recommended_fw_version(L5XX_RECOMMENDED_FIRMWARE_VERSION);

_is_locked = _hw_monitor->get_gvd_field<bool>(gvd_buff, is_camera_locked_offset);

// TODO: flash lock is not suuported yet.
// reporting lock to the application blocks flash FW update.
// remove when flash update support is required.
_is_locked = true;

auto pid_hex_str = hexify(group.uvc_devices.front().pid);

using namespace platform;
Expand Down
11 changes: 6 additions & 5 deletions src/l500/l500-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,17 @@ namespace librealsense

enum gvd_fields
{
fw_version_offset = 12,
is_camera_locked_offset = 33,
module_serial_offset = 56,
module_asic_serial_offset = 72
fw_version_offset = 12, // FunctionalPayloadVersion
is_camera_locked_offset = 6, // eyeSafety: encompasses eeprom, flash, & registers
ev-mp marked this conversation as resolved.
Show resolved Hide resolved
module_serial_offset = 60, // "OpticalHeadModuleSN" -> RS2_CAMERA_INFO_SERIAL_NUMBER
module_asic_serial_offset = 74 // RS2_CAMERA_INFO_ASIC_SERIAL_NUMBER & RS2_CAMERA_INFO_FIRMWARE_UPDATE_ID
ev-mp marked this conversation as resolved.
Show resolved Hide resolved
};

enum gvd_fields_size
{
// Keep sorted
module_serial_size = 8
module_serial_size = 4,
module_asic_serial_size = 6
};

static const std::map<std::uint16_t, std::string> rs500_sku_names = {
Expand Down