Skip to content

Commit

Permalink
1. Add some Comments
Browse files Browse the repository at this point in the history
2. small tweaks
  • Loading branch information
abernste committed Nov 28, 2018
1 parent e4be0cf commit 2979926
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@ namespace librealsense
auto&& backend = ctx->get_backend();
auto device_serial = backend.get_device_serial(vid, pid, unique_id);

if ((hid.unique_id == unique_id) || ((hid.unique_id == "*") && (hid.serial_number == device_serial)))
if ((hid.unique_id == unique_id) || // Linux check
((hid.unique_id == "*") && (hid.serial_number == device_serial))) // Windows check
{
hid_group.push_back(hid);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ds5/ds5-motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ namespace librealsense

static const char* custom_sensor_fw_ver = "5.6.0.0";

auto hid_ep = std::make_shared<ds5_hid_sensor>(this, ctx->get_backend().create_hid_device(all_hid_infos[1]),
auto hid_ep = std::make_shared<ds5_hid_sensor>(this, ctx->get_backend().create_hid_device(all_hid_infos.front()),
std::unique_ptr<frame_timestamp_reader>(new ds5_iio_hid_timestamp_reader()),
std::unique_ptr<frame_timestamp_reader>(new ds5_custom_hid_timestamp_reader()),
fps_and_sampling_frequency_per_rs2_stream,
Expand Down
2 changes: 2 additions & 0 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ namespace librealsense
const double TIMESTAMP_NSEC_TO_MSEC = 0.000001;

#ifdef _WIN32
/* The FW timestamps for HID are converted to Usec in Windows kernel */
#define HID_TIMESTAMP_MULTIPLIER TIMESTAMP_USEC_TO_MSEC
#else
/* The FW timestamps for HID are converted to Nanosec in Linux kernel */
#define HID_TIMESTAMP_MULTIPLIER TIMESTAMP_NSEC_TO_MSEC
#endif // define HID_TIMESTAMP_MULTIPLIER

Expand Down
2 changes: 1 addition & 1 deletion src/win/win-backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace librealsense
{
wmf_backend::wmf_backend()
{
CoInitializeEx(nullptr, COINIT_MULTITHREADED); // when using COINIT_APARTMENTTHREADED, calling _pISensor->SetEventSink(NULL) to stop sensor takes too much time
CoInitializeEx(nullptr, COINIT_MULTITHREADED); // when using COINIT_APARTMENTTHREADED, calling _pISensor->SetEventSink(NULL) to stop sensor can take several seconds
MFStartup(MF_VERSION, MFSTARTUP_NOSOCKET);
}

Expand Down

0 comments on commit 2979926

Please sign in to comment.