1
0
forked from drath/libratbag

hidpp10: add Leds entry to .device file

For the device I have I do not see a way to get
this information by querying the device.

If the value is set in the .device file it will
override anything that the hidpp10 driver itself
would have found.
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2017-10-01 00:35:50 +02:00
committed by Thomas H. P. Andersen
parent 8edf6e7609
commit a19a79d33a
5 changed files with 40 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ def check_profile_type_str(string):
def check_section_hidpp10(section):
permitted = ['Profiles', 'ProfileType', 'DpiRange', 'DpiList', 'DeviceIndex']
permitted = ['Profiles', 'ProfileType', 'DpiRange', 'DpiList', 'DeviceIndex', 'Leds']
for key in section.keys():
assert(key in permitted)
@@ -155,6 +155,13 @@ def check_section_hidpp10(section):
except KeyError:
pass
try:
leds = int(section['Leds'])
# 10 is arbitrarily chosen
assert(leds > 0 and leds < 10)
except KeyError:
pass
def check_section_hidpp20(section):
permitted = ['DeviceIndex']