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
+3
View File
@@ -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;
};
} } }