Rewrite logid::DeviceMonitor

This commit is contained in:
pixl
2020-06-19 21:58:33 -04:00
parent b41649b0de
commit 7f1af81910
12 changed files with 129 additions and 867 deletions

View File

View File

@@ -0,0 +1,6 @@
#ifndef LOGID_BACKEND_DJ_RECEIVERMONITOR_H
#define LOGID_BACKEND_DJ_RECEIVERMONITOR_H
#endif //LOGID_BACKEND_DJ_RECEIVERMONITOR_H

View File

@@ -5,6 +5,18 @@
using namespace logid::backend::hidpp20;
Device::Device(std::string path, hidpp::DeviceIndex index)
: hidpp::Device(path, index)
{
assert(std::get<0>(version()) >= 2);
}
Device::Device(std::shared_ptr<raw::RawDevice> raw_device, hidpp::DeviceIndex index)
: hidpp::Device(raw_device, index)
{
assert(std::get<0>(version()) >= 2);
}
std::vector<uint8_t> Device::callFunction(uint8_t feature_index,
uint8_t function, std::vector<uint8_t>& params)
{

View File

@@ -10,6 +10,9 @@ namespace hidpp20 {
class Device : public hidpp::Device
{
public:
Device(std::string path, hidpp::DeviceIndex index);
Device(std::shared_ptr<raw::RawDevice> raw_device, hidpp::DeviceIndex index);
std::vector<uint8_t> callFunction(uint8_t feature_index,
uint8_t function,
std::vector<uint8_t>& params);