Skip to content

Commit

Permalink
fix build problems
Browse files Browse the repository at this point in the history
  • Loading branch information
noacoohen committed Sep 16, 2024
1 parent a0c7df0 commit 6531238
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/libusb/device-watcher-libusb.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2019 Intel Corporation. All Rights Reserved.
// Copyright(c) 2024 Intel Corporation. All Rights Reserved.
#include "device-watcher-libusb.h"

#include "libusb.h"
#include "context-libusb.h"
#include <rsutils/string/string-utilities.h>

using namespace librealsense;
using namespace librealsense::platform;
Expand Down Expand Up @@ -68,7 +69,7 @@ void device_watcher_libusb::start(librealsense::platform::device_changed_callbac
if(rc)
LOG_ERROR("Error getting device descriptor " << libusb_error_name(rc));
else
LOG_INFO(event_str << " address: " << addr << " VID: " << hexify(desc.idVendor) << " PID: " << hexify(desc.idProduct));
LOG_INFO( event_str << " address: " << addr << " VID: "<< rsutils::string::hexify( desc.idVendor ) << " PID: " << rsutils::string::hexify( desc.idProduct ) );

// No querying or talking to devices in hotplug callback https://github.com/libusb/libusb/issues/408
((device_watcher_libusb *)user_data)->update_next = true;
Expand Down
5 changes: 3 additions & 2 deletions src/libusb/device-watcher-libusb.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* License: Apache 2.0. See LICENSE file in root directory. */
/* Copyright(c) 2019 Intel Corporation. All Rights Reserved. */
/* Copyright(c) 2024 Intel Corporation. All Rights Reserved. */
#pragma once

#include "../types.h"
#include "../backend.h"
#include "../usb/usb-device.h"
#include "libusb.h"
#include "context-libusb.h"

#include "../platform/device-watcher.h"
#include "../polling-device-watcher.h"
#include <memory>

namespace librealsense
Expand Down
4 changes: 2 additions & 2 deletions src/libusb/enumerator-libusb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "libusb/device-libusb.h"
#include "context-libusb.h"
#include "types.h"

#include <rsutils/string/string-utilities.h>
#include "libusb.h"

namespace librealsense
Expand Down Expand Up @@ -93,7 +93,7 @@ namespace librealsense
auto ret = libusb_get_device_descriptor(device, &desc);
if (LIBUSB_SUCCESS == ret)
{
LOG_DEBUG("Found device " << hexify(desc.idVendor) << " " << hexify(desc.idProduct));
LOG_DEBUG( "Found device " << rsutils::string::hexify( desc.idVendor ) << " "<< rsutils::string::hexify( desc.idProduct ) );
auto sd = get_subdevices(device, desc);
rv.insert(rv.end(), sd.begin(), sd.end());
}
Expand Down

0 comments on commit 6531238

Please sign in to comment.