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:
@@ -19,13 +19,10 @@ Device::Device(std::shared_ptr<raw::RawDevice> raw_dev,
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Device::getRegister(uint8_t address,
|
||||
const std::vector<uint8_t>& params)
|
||||
const std::vector<uint8_t>& params, hidpp::Report::Type type)
|
||||
{
|
||||
assert(params.size() <= hidpp::LongParamLength);
|
||||
|
||||
hidpp::Report::Type type = params.size() <= hidpp::ShortParamLength ?
|
||||
hidpp::Report::Type::Short : hidpp::Report::Type::Long;
|
||||
|
||||
uint8_t sub_id = type == hidpp::Report::Type::Short ?
|
||||
GetRegisterShort : GetRegisterLong;
|
||||
|
||||
@@ -33,13 +30,11 @@ std::vector<uint8_t> Device::getRegister(uint8_t address,
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Device::setRegister(uint8_t address,
|
||||
const std::vector<uint8_t>& params)
|
||||
const std::vector<uint8_t>& params,
|
||||
hidpp::Report::Type type)
|
||||
{
|
||||
assert(params.size() <= hidpp::LongParamLength);
|
||||
|
||||
hidpp::Report::Type type = params.size() <= hidpp::ShortParamLength ?
|
||||
hidpp::Report::Type::Short : hidpp::Report::Type::Long;
|
||||
|
||||
uint8_t sub_id = type == hidpp::Report::Type::Short ?
|
||||
SetRegisterShort : SetRegisterLong;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user