Skip to content

Commit

Permalink
PR #12171 from Nir-Az: Replace d500-factory with d500-info
Browse files Browse the repository at this point in the history
  • Loading branch information
Nir-Az authored Sep 7, 2023
2 parents d967045 + 8cc53ac commit f9e7501
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/ds/d500/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ target_sources(${LRS_TARGET}
"${CMAKE_CURRENT_LIST_DIR}/d500-motion.h"
"${CMAKE_CURRENT_LIST_DIR}/d500-active.h"
"${CMAKE_CURRENT_LIST_DIR}/d500-private.h"
"${CMAKE_CURRENT_LIST_DIR}/d500-factory.h"
"${CMAKE_CURRENT_LIST_DIR}/hw_monitor_extended_buffers.h"
"${CMAKE_CURRENT_LIST_DIR}/d500-options.h"
"${CMAKE_CURRENT_LIST_DIR}/d500-info.h"
)
2 changes: 1 addition & 1 deletion src/ds/d500/d500-active.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "d500-active.h"
#include "d500-private.h"
#include "d500-factory.h"
#include "d500-info.h"
#include "ds/ds-options.h"
#include "ds/ds-timestamp.h"

Expand Down
2 changes: 1 addition & 1 deletion src/ds/d500/d500-color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "proc/color-formats-converter.h"
#include "d500-options.h"
#include "d500-color.h"
#include "d500-factory.h"
#include "d500-info.h"
#include "backend.h"

namespace librealsense
Expand Down
2 changes: 1 addition & 1 deletion src/ds/d500/d500-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "d500-device.h"
#include "d500-private.h"
#include "d500-options.h"
#include "d500-factory.h"
#include "d500-info.h"
#include "ds/ds-options.h"
#include "ds/ds-timestamp.h"
#include "stream.h"
Expand Down
6 changes: 3 additions & 3 deletions src/ds/d500/d500-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "image.h"
#include "metadata-parser.h"

#include "d500-factory.h"
#include "d500-info.h"
#include "d500-private.h"
#include "ds/ds-options.h"
#include "ds/ds-timestamp.h"
Expand Down Expand Up @@ -49,12 +49,12 @@ namespace librealsense
}*/
}

std::vector<std::shared_ptr<device_info>> d500_info::pick_d500_devices(
std::vector<std::shared_ptr<d500_info>> d500_info::pick_d500_devices(
std::shared_ptr<context> ctx,
platform::backend_device_group& group)
{
std::vector<platform::uvc_device_info> chosen;
std::vector<std::shared_ptr<device_info>> results;
std::vector<std::shared_ptr<d500_info>> results;

auto valid_pid = filter_by_product(group.uvc_devices, ds::rs500_sku_pid);
auto group_devices = group_devices_and_hids_by_unique_id(group_devices_by_unique_id(valid_pid), group.hid_devices);
Expand Down
9 changes: 5 additions & 4 deletions src/ds/d500/d500-factory.h → src/ds/d500/d500-info.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2022 Intel Corporation. All Rights Reserved.
// Copyright(c) 2023 Intel Corporation. All Rights Reserved.
#pragma once

#include <src/platform/platform-device-info.h>


namespace librealsense
{
class d500_info : public platform::platform_device_info
{
public:
std::shared_ptr< device_interface > create_device() override;

d500_info( std::shared_ptr< context > ctx,
d500_info( std::shared_ptr< context > const & ctx,
std::vector< platform::uvc_device_info > && depth,
std::vector< platform::usb_device_info > && hwm,
std::vector< platform::hid_device_info > && hid )
: platform_device_info( ctx, { std::move( depth ), std::move( hwm ), std::move( hid ) } )
{
}

static std::vector<std::shared_ptr<device_info>> pick_d500_devices(
static std::vector<std::shared_ptr<d500_info>> pick_d500_devices(
std::shared_ptr<context> ctx,
platform::backend_device_group& gproup);
platform::backend_device_group& group);
};
}
2 changes: 1 addition & 1 deletion src/ds/d500/d500-motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <src/metadata.h>
#include "ds/ds-timestamp.h"
#include "ds/ds-options.h"
#include "d500-factory.h"
#include "d500-info.h"
#include "stream.h"
#include "proc/motion-transform.h"
#include "proc/auto-exposure-processor.h"
Expand Down

0 comments on commit f9e7501

Please sign in to comment.