Skip to content

Commit

Permalink
add _mask
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Oct 4, 2023
1 parent d714cfa commit d51008e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/device_hub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ namespace librealsense
typedef rs2::devices_changed_callback<std::function<void(rs2::event_information& info)>> hub_devices_changed_callback;

device_hub::device_hub(std::shared_ptr<librealsense::context> ctx, int mask)
: _ctx(ctx),
_device_changes_callback_id(0)
: _ctx( ctx )
, _mask( mask )
, _device_changes_callback_id( 0 )
{
_device_list = _ctx->query_devices(mask);

Expand Down Expand Up @@ -91,7 +92,7 @@ namespace librealsense
std::shared_ptr<device_interface> res = nullptr;

// check if there is at least one device connected
_device_list = _ctx->query_devices(RS2_PRODUCT_LINE_ANY);
_device_list = _ctx->query_devices(_mask);
if (_device_list.size() > 0)
{
res = create_device(serial, loop_through_devices);
Expand Down
1 change: 1 addition & 0 deletions src/device_hub.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ namespace librealsense
std::vector<std::shared_ptr<device_info>> _device_list;
int _camera_index = 0;
uint64_t _device_changes_callback_id;
int _mask;
};
}

0 comments on commit d51008e

Please sign in to comment.