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:
@@ -40,6 +40,7 @@ namespace hidpp
|
||||
|
||||
std::string devicePath() const { return path; }
|
||||
DeviceIndex deviceIndex() const { return index; }
|
||||
std::tuple<uint8_t, uint8_t> version() const { return _version; }
|
||||
|
||||
void listen(); // Runs asynchronously
|
||||
void stopListening();
|
||||
@@ -56,6 +57,8 @@ namespace hidpp
|
||||
DeviceIndex index;
|
||||
uint8_t supported_reports;
|
||||
|
||||
std::tuple<uint8_t, uint8_t> _version;
|
||||
|
||||
std::map<std::string, std::shared_ptr<EventHandler>> event_handlers;
|
||||
};
|
||||
} } }
|
||||
|
||||
Reference in New Issue
Block a user