Skip to content

Commit

Permalink
dfu-d457: compilation with mf and rsusb
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Perchanov <[email protected]>
  • Loading branch information
dmipx committed May 28, 2024
1 parent 1a7ccf2 commit 5a4d30c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/fw-update/fw-update-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include <thread>
#include <string>
#include <regex>
#include <fstream>

#define DEFAULT_TIMEOUT 100
#define FW_UPDATE_INTERFACE_NUMBER 0
namespace librealsense
Expand Down Expand Up @@ -187,7 +189,7 @@ namespace librealsense
, _product_line( product_line )
, _serial_number( mipi_device->get_info().serial_number )
{
std::ifstream fw_path_in_device(_physical_port);
std::ifstream fw_path_in_device(_physical_port.c_str());
if (!fw_path_in_device)
{
throw std::runtime_error("Firmware Update failed - wrong path or permissions missing");
Expand Down Expand Up @@ -304,7 +306,7 @@ namespace librealsense
throw librealsense::invalid_value_exception("Device: " + get_serial_number() + " failed to update firmware\nImage is unsupported for this device or corrupted");
// Write signed firmware to appropriate file descriptor

std::ofstream fw_path_in_device(_physical_port, std::ios::binary);
std::ofstream fw_path_in_device(_physical_port.c_str(), std::ios::binary);
if (!fw_path_in_device)
{
throw std::runtime_error("Firmware Update failed - wrong path or permissions missing");
Expand Down
5 changes: 5 additions & 0 deletions src/mf/mf-backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ namespace librealsense
return devices;
}

std::vector<mipi_device_info> wmf_backend::query_mipi_devices() const
{
return std::vector<mipi_device_info>();
}

class win_event_device_watcher : public device_watcher
{
public:
Expand Down
3 changes: 3 additions & 0 deletions src/mf/mf-backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ namespace librealsense

std::shared_ptr<hid_device> create_hid_device(hid_device_info info) const override;
std::vector<hid_device_info> query_hid_devices() const override;

std::vector<mipi_device_info> query_mipi_devices() const override;

std::shared_ptr<device_watcher> create_device_watcher() const override;
std::string get_device_serial(uint16_t device_vid, uint16_t device_pid, const std::string& device_uid) const override;

Expand Down
5 changes: 5 additions & 0 deletions src/rsusb-backend/rsusb-backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,10 @@ namespace librealsense
{
return query_hid_devices_info();
}

std::vector<mipi_device_info> rs_backend::query_mipi_devices() const
{
return std::vector<mipi_device_info>();
}
}
}
1 change: 1 addition & 0 deletions src/rsusb-backend/rsusb-backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace librealsense
// Not supported
std::shared_ptr<hid_device> create_hid_device(hid_device_info info) const override;
std::vector<hid_device_info> query_hid_devices() const override;
std::vector<mipi_device_info> query_mipi_devices() const override;
};
}
}

0 comments on commit 5a4d30c

Please sign in to comment.