Don't use DeviceStatus on unifying devices

This commit is contained in:
pixl 2020-07-20 00:07:35 -04:00
parent 78c0788be6
commit 1056dfa032
No known key found for this signature in database
GPG Key ID: 1866C148CD593B6E

View File

@ -25,6 +25,14 @@ using namespace logid::backend;
DeviceStatus::DeviceStatus(logid::Device *dev) : DeviceFeature(dev)
{
/* This feature is redundant on receivers since the receiver
* handles wakeup/sleep events. If the device is connected on a
* receiver, pretend this feature is unsupported.
*/
if(dev->hidpp20().deviceIndex() >= hidpp::WirelessDevice1 &&
dev->hidpp20().deviceIndex() <= hidpp::WirelessDevice6)
throw UnsupportedFeature();
try {
_wireless_device_status =std::make_shared<
hidpp20::WirelessDeviceStatus>(&dev->hidpp20());