mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-08 07:33:53 +01:00
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:
committed by
Thomas H. P. Andersen
parent
8edf6e7609
commit
a19a79d33a
@@ -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']
|
||||
|
||||
@@ -42,6 +42,9 @@ DpiList=50;200;400;800
|
||||
# Should be unset unless required
|
||||
# DeviceIndex=1
|
||||
|
||||
# The number of LEDs
|
||||
Leds=1
|
||||
|
||||
|
||||
[Driver/hidpp20]
|
||||
# The HID++ 2.0 device index
|
||||
|
||||
Reference in New Issue
Block a user