Skip to content

Commit

Permalink
PR #11265 from Eran: remove L535
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel authored Dec 28, 2022
2 parents 93de92b + 8807c0c commit 16dafee
Show file tree
Hide file tree
Showing 25 changed files with 6 additions and 526 deletions.
14 changes: 0 additions & 14 deletions common/fw-update-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@
#include "common/fw/D4XX_FW_Image.h"
#include "common/fw/SR3XX_FW_Image.h"
#include "common/fw/L51X_FW_Image.h"
#include "common/fw/L53X_FW_Image.h"
#else
#define FW_D4XX_FW_IMAGE_VERSION ""
#define FW_SR3XX_FW_IMAGE_VERSION ""
#define FW_L51X_FW_IMAGE_VERSION ""
#define FW_L53X_FW_IMAGE_VERSION ""
const char* fw_get_D4XX_FW_Image(int) { return NULL; }
const char* fw_get_SR3XX_FW_Image(int) { return NULL; }
const char* fw_get_L51X_FW_Image(int) { return NULL; }
const char* fw_get_L53X_FW_Image(int) { return NULL; }


#endif // INTERNAL_FW
Expand Down Expand Up @@ -63,7 +60,6 @@ namespace rs2
{
if (product_line == RS2_PRODUCT_LINE_D400) return FW_D4XX_FW_IMAGE_VERSION;
//else if (product_line == RS2_PRODUCT_LINE_SR300) return FW_SR3XX_FW_IMAGE_VERSION;
else if (product_line == RS2_PRODUCT_LINE_L500 && pid == "0B68") return FW_L53X_FW_IMAGE_VERSION;
else if (product_line == RS2_PRODUCT_LINE_L500) return FW_L51X_FW_IMAGE_VERSION;
else return "";
}
Expand Down Expand Up @@ -94,16 +90,6 @@ namespace rs2
}
break;
case RS2_PRODUCT_LINE_L500:
if( pid == "0B68" || pid == "0B72" ) // L535 || L535 Recovery
{
if( strlen( FW_L53X_FW_IMAGE_VERSION ) )
{
int size = 0;
auto hex = fw_get_L53X_FW_Image( size );
image = std::vector< uint8_t >( hex, hex + size );
}
}
else
{ // default for all L515 use cases (include recovery usb2 old pid)
if( strlen( FW_L51X_FW_IMAGE_VERSION ) )
{
Expand Down
7 changes: 0 additions & 7 deletions common/fw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ message(STATUS "L51X_FW_VERSION: ${L51X_FW_VERSION}")
set(L51X_FW_SHA1 ab73e5bfc520c0aa0340cada4b3e317b8fd31a4d)
set(L51X_FW_URL "${REALSENSE_FIRMWARE_URL}/Releases/L5xx/FW")

string(REGEX MATCH "L53X_RECOMMENDED_FIRMWARE_VERSION \"([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\"" _ ${ver})
set(L53X_FW_VERSION ${CMAKE_MATCH_1})
message(STATUS "L53X_FW_VERSION: ${L53X_FW_VERSION}")
set(L53X_FW_SHA1 9bc28aaf079b105d9a20a0bd845ea222b8754571)
set(L53X_FW_URL "${REALSENSE_FIRMWARE_URL}/Releases/L5xx/FW")

add_library(${PROJECT_NAME} STATIC empty.c)

# disable link time optimization for fw by adding -fno-lto to disable -flto flag
Expand Down Expand Up @@ -94,7 +88,6 @@ target_binary( "${D4XX_FW_URL}" "${D4XX_FW_VERSION}" "${D4XX_FW_SHA1}" D4XX_FW
target_binary( "${SR3XX_FW_URL}" "${SR3XX_FW_VERSION}" "${SR3XX_FW_SHA1}" SR3XX_FW_Image .bin)
target_binary( "${T26X_FW_URL}" "${T26X_FW_VERSION}" "${T26X_FW_SHA1}" target .mvcmd)
target_binary( "${L51X_FW_URL}" "${L51X_FW_VERSION}" "${L51X_FW_SHA1}" L51X_FW_Image .bin)
target_binary( "${L53X_FW_URL}" "${L53X_FW_VERSION}" "${L53X_FW_SHA1}" L53X_FW_Image .bin)



Expand Down
2 changes: 1 addition & 1 deletion common/fw/firmware-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
#define SR3XX_RECOMMENDED_FIRMWARE_VERSION "3.26.1.0"
#define T26X_FIRMWARE_VERSION "0.2.0.951"
#define L51X_RECOMMENDED_FIRMWARE_VERSION "1.5.8.1"
#define L53X_RECOMMENDED_FIRMWARE_VERSION "3.5.5.1"

1 change: 0 additions & 1 deletion common/fw/fw.rc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "D4XX_FW_Image.rc"
#include "SR3XX_FW_Image.rc"
#include "L51X_FW_Image.rc"
#include "L53X_FW_Image.rc"
#include "target.rc"
2 changes: 1 addition & 1 deletion common/metadata-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ namespace rs2
if (mi == "00")
{
// L500 has 3 media-pins
if (equal(pid, "0b0d") || equal(pid, "0b3d") || equal(pid, "0b64") || equal(pid, "0b68")) return 3;
if (equal(pid, "0b0d") || equal(pid, "0b3d") || equal(pid, "0b64")) return 3;
// D405 has 3 media-pins
else if (equal(pid, "0b5b")) return 3;
else return 2; // D400 has two
Expand Down
4 changes: 2 additions & 2 deletions src/fw-update/fw-update-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace librealsense
return RS2_PRODUCT_LINE_SR300;
if( ds::RS_RECOVERY_PID == usb_info.pid )
return RS2_PRODUCT_LINE_D400;
if( L500_RECOVERY_PID == usb_info.pid || L535_RECOVERY_PID == usb_info.pid)
if( L500_RECOVERY_PID == usb_info.pid )
return RS2_PRODUCT_LINE_L500;
if( ds::RS_USB2_RECOVERY_PID == usb_info.pid || L500_USB2_RECOVERY_PID_OLD == usb_info.pid )
{
Expand Down Expand Up @@ -133,7 +133,7 @@ namespace librealsense
return std::make_shared<ds_update_device>(ctx, register_device_notifications, usb);
if (SR300_RECOVERY == info.pid)
return std::make_shared<sr300_update_device>(ctx, register_device_notifications, usb);
if (L500_RECOVERY_PID == info.pid || L535_RECOVERY_PID == info.pid)
if (L500_RECOVERY_PID == info.pid )
return std::make_shared<l500_update_device>(ctx, register_device_notifications, usb);
if (ds::RS_USB2_RECOVERY_PID == info.pid || L500_USB2_RECOVERY_PID_OLD == info.pid)
{
Expand Down
8 changes: 0 additions & 8 deletions src/l500/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,21 @@ target_sources(${LRS_TARGET}
"${CMAKE_CURRENT_LIST_DIR}/l500-depth.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l500-private.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l500-color.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l535-color-device.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l500-device.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l500-motion.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l500-factory.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l500-fw-update-device.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l500-serializable.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l500-options.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l535-device-options.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l535-amc-option.cpp"
"${CMAKE_CURRENT_LIST_DIR}/l535-preset-option.cpp"

"${CMAKE_CURRENT_LIST_DIR}/l500-depth.h"
"${CMAKE_CURRENT_LIST_DIR}/l500-private.h"
"${CMAKE_CURRENT_LIST_DIR}/l500-color.h"
"${CMAKE_CURRENT_LIST_DIR}/l535-color-device.h"
"${CMAKE_CURRENT_LIST_DIR}/l500-device.h"
"${CMAKE_CURRENT_LIST_DIR}/l500-motion.h"
"${CMAKE_CURRENT_LIST_DIR}/l500-factory.h"
"${CMAKE_CURRENT_LIST_DIR}/l500-fw-update-device.h"
"${CMAKE_CURRENT_LIST_DIR}/l500-serializable.h"
"${CMAKE_CURRENT_LIST_DIR}/l500-options.h"
"${CMAKE_CURRENT_LIST_DIR}/l535-device-options.h"
"${CMAKE_CURRENT_LIST_DIR}/l535-amc-option.h"
"${CMAKE_CURRENT_LIST_DIR}/l535-preset-option.h"
)

60 changes: 1 addition & 59 deletions src/l500/l500-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
#include "l500-depth.h"
#include "l500-motion.h"
#include "l500-color.h"
#include "l535-color-device.h"
#include "l500-serializable.h"
#include "l535-device-options.h"
#include "../firmware_logger_device.h"

namespace librealsense
Expand Down Expand Up @@ -65,45 +63,6 @@ namespace librealsense
};
};

class l535_device : public l500_depth,
public l535::device_options,
public l535::color_device,
public l500_motion,
public l500_serializable,
public firmware_logger_device
{
public:
l535_device(std::shared_ptr<context> ctx,
const platform::backend_device_group& group,
bool register_device_notifications)
: device(ctx, group, register_device_notifications),
l500_device(ctx, group),
l500_depth(ctx, group),
device_options(ctx, group),
color_device(ctx, group),
l500_motion(ctx, group),
l500_serializable(l500_device::_hw_monitor, get_depth_sensor()),
firmware_logger_device(ctx, group, l500_device::_hw_monitor,
get_firmware_logs_command(),
get_flash_logs_command())
{}

std::shared_ptr<matcher> create_matcher(const frame_holder& frame) const override;

std::vector<tagged_profile> get_profiles_tags() const override
{
std::vector<tagged_profile> tags;
auto depth_profiles = l500_depth::get_profiles_tags();
auto color_profiles = l500_color::get_profiles_tags();
auto motion_profiles = l500_motion::get_profiles_tags();

tags.insert(tags.begin(), depth_profiles.begin(), depth_profiles.end());
tags.insert(tags.begin(), color_profiles.begin(), color_profiles.end());
tags.insert(tags.begin(), motion_profiles.begin(), motion_profiles.end());
return tags;
};
};

class rs500_device : public l500_depth,
public firmware_logger_device
{
Expand Down Expand Up @@ -138,8 +97,6 @@ namespace librealsense
case L515_PID_PRE_PRQ:
case L515_PID:
return std::make_shared<l515_device>(ctx, group, register_device_notifications);
case L535_PID:
return std::make_shared<l535_device>(ctx, group, register_device_notifications);
default:
throw std::runtime_error( rsutils::string::from() << "Unsupported L500 model! 0x" << std::hex
<< std::setw( 4 ) << std::setfill( '0' ) << (int)pid );
Expand All @@ -153,7 +110,7 @@ namespace librealsense
std::vector<platform::uvc_device_info> chosen;
std::vector<std::shared_ptr<device_info>> results;

auto correct_pid = filter_by_product(group.uvc_devices, { L500_PID, L515_PID, L535_PID, L515_PID_PRE_PRQ });
auto correct_pid = filter_by_product(group.uvc_devices, { L500_PID, L515_PID, L515_PID_PRE_PRQ });
auto group_devices = group_devices_and_hids_by_unique_id(group_devices_by_unique_id(correct_pid), group.hid_devices);
for (auto& g : group_devices)
{
Expand Down Expand Up @@ -208,19 +165,4 @@ namespace librealsense
std::vector<std::shared_ptr<matcher>> depth_rgb_imu_matchers = {ts_depth_rgb, identity_gyro, identity_accel};
return std::make_shared<composite_identity_matcher>(depth_rgb_imu_matchers);
}

std::shared_ptr<matcher> l535_device::create_matcher(const frame_holder & frame) const
{
LOG_DEBUG("l535_device::create_matcher");
std::vector<std::shared_ptr<matcher>> depth_rgb_matchers = { l500_depth::create_matcher(frame),
std::make_shared<identity_matcher>(_color_stream->get_unique_id(), _color_stream->get_stream_type()) };

auto ts_depth_rgb = std::make_shared<timestamp_composite_matcher>(depth_rgb_matchers);

auto identity_gyro = std::make_shared<identity_matcher>(_gyro_stream->get_unique_id(), _gyro_stream->get_stream_type());
auto identity_accel = std::make_shared<identity_matcher>(_accel_stream->get_unique_id(), _accel_stream->get_stream_type());

std::vector<std::shared_ptr<matcher>> depth_rgb_imu_matchers = { ts_depth_rgb, identity_gyro, identity_accel };
return std::make_shared<composite_identity_matcher>(depth_rgb_imu_matchers);
}
}
7 changes: 0 additions & 7 deletions src/l500/l500-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ static const int MAX_NUM_OF_DEPTH_RESOLUTIONS = 5;
namespace librealsense
{
const uint16_t L500_RECOVERY_PID = 0x0b55;
const uint16_t L535_RECOVERY_PID = 0x0B72;
const uint16_t L500_USB2_RECOVERY_PID_OLD = 0x0adc; // Units with old DFU_PAYLAOD on USB2 report ds5 PID (RS_USB2_RECOVERY_PID)
const uint16_t L500_PID = 0x0b0d;
const uint16_t L515_PID_PRE_PRQ = 0x0b3d;
const uint16_t L515_PID = 0x0b64;
const uint16_t L535_PID = 0x0b68;

class l500_device;

Expand Down Expand Up @@ -252,23 +250,18 @@ namespace librealsense

static const std::map<std::uint16_t, std::string> rs500_sku_names = {
{ L500_RECOVERY_PID, "Intel RealSense L51X Recovery"},
{ L535_RECOVERY_PID, "Intel RealSense L53X Recovery"},
{ L500_USB2_RECOVERY_PID_OLD, "Intel RealSense L51X Recovery"},
{ L500_PID, "Intel RealSense L500"},
{ L515_PID_PRE_PRQ, "Intel RealSense L515 (pre-PRQ)"},
{ L515_PID, "Intel RealSense L515"},
{ L535_PID, "Intel RealSense L535"},

};

static std::map<uint16_t, std::pair<std::string, std::string>> device_to_fw_min_max_version = {
{ L500_RECOVERY_PID, { "1.5.1.3", "1.99.99.99"}},
{ L535_RECOVERY_PID, { "3.5.5.1", "3.99.99.99"}},
{ L500_USB2_RECOVERY_PID_OLD, { "1.5.1.3", "1.99.99.99"}},
{ L500_PID, { "1.5.1.3", "1.99.99.99"}},
{ L515_PID_PRE_PRQ, { "1.5.1.3", "1.99.99.99"}},
{ L515_PID, { "1.5.1.3", "1.99.99.99"}},
{ L535_PID, { "3.5.5.1", "3.99.99.99"}}
};

// Known FW error codes, if we poll for errors (RS2_OPTION_ERROR_POLLING_ENABLED)
Expand Down
81 changes: 0 additions & 81 deletions src/l500/l535-amc-option.cpp

This file was deleted.

Loading

0 comments on commit 16dafee

Please sign in to comment.