Print version number of device 1 on each raw dev.

Only works on HID++ >=2.0 so far. Also solves a race condition where
the wrong response can be sent to a request.
This commit is contained in:
pixl
2020-06-18 01:34:25 -04:00
parent 14d07c220e
commit c21a923ab2
19 changed files with 518 additions and 123 deletions
+28
View File
@@ -0,0 +1,28 @@
#include "Feature.h"
using namespace logid::backend::hidpp20;
const char* Feature::UnsupportedFeature::what() const noexcept
{
return "Unsupported feature";
}
uint16_t Feature::UnsupportedFeature::code() const noexcept
{
return _f_id;
}
std::vector<uint8_t> Feature::callFunction(uint8_t function_id, std::vector<uint8_t>& params)
{
return _device->callFunction(_index, function_id, params);
}
Feature::Feature(Device* dev, uint16_t _id) : _device (dev), _index (0xff)
{
///TODO: Set index
}
Feature::Feature(Device* dev, uint8_t _index) : _device (dev), _index (_index)
{
}