Implement receiver HID++ connect/disconnect events
Many changes were made here but that was the biggest one. There's currently a bug where std::system_error: Broken pipe is thrown after launching the daemon with a receiver connector. A workaround for this bug is to simply shake the mouse while starting the daemon. I will investigate this soon.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "Device.h"
|
||||
|
||||
using namespace logid;
|
||||
using namespace logid::backend;
|
||||
|
||||
Device::Device(std::string path, backend::hidpp::DeviceIndex index) :
|
||||
_hidpp20 (path, index), _path (path), _index (index)
|
||||
@@ -9,6 +10,13 @@ Device::Device(std::string path, backend::hidpp::DeviceIndex index) :
|
||||
log_printf(DEBUG, "logid::Device created on %s:%d", _path.c_str(), _index);
|
||||
}
|
||||
|
||||
Device::Device(const std::shared_ptr<backend::raw::RawDevice>& raw_device,
|
||||
hidpp::DeviceIndex index) : _hidpp20(raw_device, index), _path
|
||||
(raw_device->hidrawPath()), _index (index)
|
||||
{
|
||||
log_printf(DEBUG, "logid::Device created on %s:%d", _path.c_str(), _index);
|
||||
}
|
||||
|
||||
void Device::sleep()
|
||||
{
|
||||
log_printf(INFO, "%s:%d fell asleep.", _path.c_str(), _index);
|
||||
|
||||
Reference in New Issue
Block a user