Add basic 0xc534 receiver and M185 mouse support
Fix connection notification protocol for M185 Fixes from review
This commit is contained in:
parent
c36cc506b6
commit
db0656967b
|
@ -49,7 +49,7 @@ NANO_RECEIVER_C525 = _nano_receiver(0xc525)
|
||||||
NANO_RECEIVER_C526 = _nano_receiver(0xc526)
|
NANO_RECEIVER_C526 = _nano_receiver(0xc526)
|
||||||
NANO_RECEIVER_C52e = _nano_receiver(0xc52e)
|
NANO_RECEIVER_C52e = _nano_receiver(0xc52e)
|
||||||
NANO_RECEIVER_C531 = _nano_receiver(0xc531)
|
NANO_RECEIVER_C531 = _nano_receiver(0xc531)
|
||||||
|
NANO_RECEIVER_C534 = _nano_receiver(0xc534)
|
||||||
|
|
||||||
del _unifying_receiver, _nano_receiver
|
del _unifying_receiver, _nano_receiver
|
||||||
|
|
||||||
|
@ -67,4 +67,5 @@ ALL = (
|
||||||
NANO_RECEIVER_C526,
|
NANO_RECEIVER_C526,
|
||||||
NANO_RECEIVER_C52e,
|
NANO_RECEIVER_C52e,
|
||||||
NANO_RECEIVER_C531,
|
NANO_RECEIVER_C531,
|
||||||
|
NANO_RECEIVER_C534,
|
||||||
)
|
)
|
||||||
|
|
|
@ -213,7 +213,16 @@ _D('Illuminated Living-Room Keyboard K830', protocol=2.0, wpid='4032',
|
||||||
# Mice
|
# Mice
|
||||||
|
|
||||||
_D('Wireless Mouse M175', protocol=2.0, wpid='4008')
|
_D('Wireless Mouse M175', protocol=2.0, wpid='4008')
|
||||||
_D('Wireless Mouse M185')
|
_D('Wireless Mouse M185 new', codename='M185n', protocol=4.5, wpid='4054',
|
||||||
|
settings=[
|
||||||
|
_FS.lowres_smooth_scroll(),
|
||||||
|
_FS.pointer_speed(),
|
||||||
|
])
|
||||||
|
_D('Wireless Mouse M185 old', codename='M185o', protocol=4.5, wpid='4055',
|
||||||
|
settings=[
|
||||||
|
_FS.lowres_smooth_scroll(),
|
||||||
|
_FS.pointer_speed(),
|
||||||
|
])
|
||||||
_D('Wireless Mouse M187', protocol=2.0, wpid='4019')
|
_D('Wireless Mouse M187', protocol=2.0, wpid='4019')
|
||||||
_D('Wireless Mouse M215', protocol=1.0, wpid='1020')
|
_D('Wireless Mouse M215', protocol=1.0, wpid='1020')
|
||||||
_D('Wireless Mouse M235')
|
_D('Wireless Mouse M235')
|
||||||
|
|
|
@ -156,6 +156,7 @@ def _process_hidpp10_notification(device, status, n):
|
||||||
if n.sub_id == 0x41:
|
if n.sub_id == 0x41:
|
||||||
protocol_name = ('unifying (eQuad DJ)' if n.address == 0x04
|
protocol_name = ('unifying (eQuad DJ)' if n.address == 0x04
|
||||||
else 'eQuad' if n.address == 0x03
|
else 'eQuad' if n.address == 0x03
|
||||||
|
else 'M185' if n.address == 0x0A
|
||||||
else None)
|
else None)
|
||||||
if protocol_name:
|
if protocol_name:
|
||||||
if _log.isEnabledFor(_DEBUG):
|
if _log.isEnabledFor(_DEBUG):
|
||||||
|
|
|
@ -336,10 +336,14 @@ class Receiver(object):
|
||||||
|
|
||||||
# read the serial immediately, so we can find out max_devices
|
# read the serial immediately, so we can find out max_devices
|
||||||
# this will tell us if it's a Unifying or Nano receiver
|
# this will tell us if it's a Unifying or Nano receiver
|
||||||
serial_reply = self.read_register(_R.receiver_info, 0x03)
|
if self.product_id != 'c534':
|
||||||
assert serial_reply
|
serial_reply = self.read_register(_R.receiver_info, 0x03)
|
||||||
self.serial = _strhex(serial_reply[1:5])
|
assert serial_reply
|
||||||
self.max_devices = ord(serial_reply[6:7])
|
self.serial = _strhex(serial_reply[1:5])
|
||||||
|
self.max_devices = ord(serial_reply[6:7])
|
||||||
|
else:
|
||||||
|
self.serial = 0
|
||||||
|
self.max_devices = 6
|
||||||
|
|
||||||
if self.max_devices == 6:
|
if self.max_devices == 6:
|
||||||
self.name = 'Unifying Receiver'
|
self.name = 'Unifying Receiver'
|
||||||
|
|
|
@ -335,8 +335,11 @@ TASK = _NamedInts(
|
||||||
ShowUI=0x0092,
|
ShowUI=0x0092,
|
||||||
)
|
)
|
||||||
TASK._fallback = lambda x: 'unknown:%04X' % x
|
TASK._fallback = lambda x: 'unknown:%04X' % x
|
||||||
|
# hidpp 4.5 info from https://lekensteyn.nl/files/logitech/x1b04_specialkeysmsebuttons.html
|
||||||
KEY_FLAG = _NamedInts(
|
KEY_FLAG = _NamedInts(
|
||||||
|
virtual=0x80,
|
||||||
|
persistently_divertable=0x40,
|
||||||
|
divertable=0x20,
|
||||||
reprogrammable=0x10,
|
reprogrammable=0x10,
|
||||||
FN_sensitive=0x08,
|
FN_sensitive=0x08,
|
||||||
nonstandard=0x04,
|
nonstandard=0x04,
|
||||||
|
|
|
@ -32,6 +32,7 @@ ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c518", GOTO="solaar_apply"
|
||||||
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c51a", GOTO="solaar_apply"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c51a", GOTO="solaar_apply"
|
||||||
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c521", GOTO="solaar_apply"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c521", GOTO="solaar_apply"
|
||||||
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c525", GOTO="solaar_apply"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c525", GOTO="solaar_apply"
|
||||||
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c534", GOTO="solaar_apply"
|
||||||
|
|
||||||
GOTO="solaar_end"
|
GOTO="solaar_end"
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c518", GOTO="solaar_apply"
|
||||||
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c51a", GOTO="solaar_apply"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c51a", GOTO="solaar_apply"
|
||||||
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c521", GOTO="solaar_apply"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c521", GOTO="solaar_apply"
|
||||||
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c525", GOTO="solaar_apply"
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c525", GOTO="solaar_apply"
|
||||||
|
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c534", GOTO="solaar_apply"
|
||||||
|
|
||||||
GOTO="solaar_end"
|
GOTO="solaar_end"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue