device: add USB information for G700s

This commit is contained in:
Peter F. Patel-Schneider 2020-10-01 16:11:02 -04:00
parent a9d6b4c319
commit fdb1b43373
2 changed files with 9 additions and 5 deletions

View File

@ -156,11 +156,11 @@ ALL = (
LIGHTSPEED_RECEIVER_C541,
)
_wired_device = lambda product_id: {
_wired_device = lambda product_id, interface: {
'vendor_id': 0x046d,
'product_id': product_id,
'bus_id': 0x3,
'usb_interface': 2,
'usb_interface': interface,
'isDevice': True
}
@ -170,7 +170,7 @@ WIRED_DEVICES = []
for _ignore, d in _DEVICES.items():
if d.usbid:
WIRED_DEVICES.append(_wired_device(d.usbid))
WIRED_DEVICES.append(_wired_device(d.usbid, d.interface if d.interface else 2))
if d.btid:
WIRED_DEVICES.append(_bt_device(d.btid))

View File

@ -33,7 +33,7 @@ from .settings_templates import RegisterSettings as _RS
_DeviceDescriptor = namedtuple(
'_DeviceDescriptor',
('name', 'kind', 'wpid', 'codename', 'protocol', 'registers', 'settings', 'persister', 'usbid', 'btid')
('name', 'kind', 'wpid', 'codename', 'protocol', 'registers', 'settings', 'persister', 'usbid', 'interface', 'btid')
)
del namedtuple
@ -51,7 +51,8 @@ def _D(
settings=None,
persister=None,
usbid=None,
btid=None
interface=None,
btid=None,
):
assert name
@ -96,6 +97,7 @@ def _D(
settings=settings,
persister=persister,
usbid=usbid,
interface=interface,
btid=btid
)
@ -555,6 +557,8 @@ _D(
codename='G700s',
protocol=1.0,
wpid='102A',
usbid=0xc07c,
interface=1,
registers=(
_R.battery_status,
_R.three_leds,