Compare commits
No commits in common. "master" and "1.1.20rc2" have entirely different histories.
|
|
@ -706,14 +706,6 @@ class Device:
|
||||||
long_message=long,
|
long_message=long,
|
||||||
protocol=self.protocol,
|
protocol=self.protocol,
|
||||||
)
|
)
|
||||||
if logger.isEnabledFor(logging.WARN):
|
|
||||||
logger.warning(
|
|
||||||
"%s: request failure for device %s %s %s",
|
|
||||||
self,
|
|
||||||
self.handle,
|
|
||||||
self.receiver,
|
|
||||||
self.receiver._devices if self.receiver else None,
|
|
||||||
)
|
|
||||||
|
|
||||||
def feature_request(self, feature, function=0x00, *params, no_reply=False):
|
def feature_request(self, feature, function=0x00, *params, no_reply=False):
|
||||||
if self.protocol >= 2.0:
|
if self.protocol >= 2.0:
|
||||||
|
|
@ -738,8 +730,6 @@ class Device:
|
||||||
if sub_idx is not None:
|
if sub_idx is not None:
|
||||||
return self.centurion_bridge_request(sub_idx, function, *params, no_reply=no_reply)
|
return self.centurion_bridge_request(sub_idx, function, *params, no_reply=no_reply)
|
||||||
return hidpp20.feature_request(self, feature, function, *params, no_reply=no_reply)
|
return hidpp20.feature_request(self, feature, function, *params, no_reply=no_reply)
|
||||||
if logger.isEnabledFor(logging.WARN):
|
|
||||||
logger.warning("%s: feature request failure for device with protocol %s", self, self.protocol)
|
|
||||||
|
|
||||||
# Max sub-message bytes in the first bridge fragment (for 0x51):
|
# Max sub-message bytes in the first bridge fragment (for 0x51):
|
||||||
# 64 - 1 (report ID) - 1 (cpl_len) - 1 (flags) - 2 (bridge prefix) - 2 (bridge hdr) = 57;
|
# 64 - 1 (report ID) - 1 (cpl_len) - 1 (flags) - 2 (bridge prefix) - 2 (bridge hdr) = 57;
|
||||||
|
|
|
||||||
|
|
@ -1756,10 +1756,6 @@ def feature_request(device, feature, function=0x00, *params, no_reply=False):
|
||||||
if feature in device.features:
|
if feature in device.features:
|
||||||
feature_index = device.features[feature]
|
feature_index = device.features[feature]
|
||||||
return device.request((feature_index << 8) + (function & 0xFF), *params, no_reply=no_reply)
|
return device.request((feature_index << 8) + (function & 0xFF), *params, no_reply=no_reply)
|
||||||
if logger.isEnabledFor(logging.WARN):
|
|
||||||
logger.warning(
|
|
||||||
"%s: feature request failure for device online %s and features %s", device, device.online, device.features
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Hidpp20:
|
class Hidpp20:
|
||||||
|
|
|
||||||
|
|
@ -96,8 +96,6 @@ class _ThreadedHandle:
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
if self._local:
|
if self._local:
|
||||||
return str(int(self))
|
return str(int(self))
|
||||||
else:
|
|
||||||
return "None"
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f"<_ThreadedHandle({self.path})>"
|
return f"<_ThreadedHandle({self.path})>"
|
||||||
|
|
|
||||||
|
|
@ -171,8 +171,6 @@ class Receiver:
|
||||||
self.pairing = Pairing()
|
self.pairing = Pairing()
|
||||||
self.initialize(product_info)
|
self.initialize(product_info)
|
||||||
hidpp10.set_configuration_pending_flags(self, 0xFF)
|
hidpp10.set_configuration_pending_flags(self, 0xFF)
|
||||||
if logger.isEnabledFor(logging.INFO):
|
|
||||||
logger.info("%s: init receiver: handle %s, path %s, serial %s", self, self.handle, self.path, self.serial)
|
|
||||||
|
|
||||||
def initialize(self, product_info: dict):
|
def initialize(self, product_info: dict):
|
||||||
# read the receiver information subregister, so we can find out max_devices
|
# read the receiver information subregister, so we can find out max_devices
|
||||||
|
|
@ -187,8 +185,6 @@ class Receiver:
|
||||||
self.max_devices = product_info.get("max_devices", 1)
|
self.max_devices = product_info.get("max_devices", 1)
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
if logger.isEnabledFor(logging.INFO):
|
|
||||||
logger.info("%s: closing - handle %s %s", self, type(self.handle), self.handle)
|
|
||||||
handle, self.handle = self.handle, None
|
handle, self.handle = self.handle, None
|
||||||
for _n, d in self._devices.items():
|
for _n, d in self._devices.items():
|
||||||
if d:
|
if d:
|
||||||
|
|
@ -603,10 +599,9 @@ receiver_class_mapping = {
|
||||||
|
|
||||||
def create_receiver(low_level: LowLevelInterface, device_info, setting_callback=None) -> Optional[Receiver]:
|
def create_receiver(low_level: LowLevelInterface, device_info, setting_callback=None) -> Optional[Receiver]:
|
||||||
"""Opens a Logitech Receiver found attached to the machine, by Linux device path."""
|
"""Opens a Logitech Receiver found attached to the machine, by Linux device path."""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
handle = low_level.open_path(device_info.path)
|
handle = low_level.open_path(device_info.path)
|
||||||
if logger.isEnabledFor(logging.INFO):
|
|
||||||
logger.info("create receiver %s %s", handle, device_info)
|
|
||||||
if handle:
|
if handle:
|
||||||
usb_id = device_info.product_id
|
usb_id = device_info.product_id
|
||||||
if isinstance(usb_id, str):
|
if isinstance(usb_id, str):
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ def run(receivers, args, _find_receiver, find_device):
|
||||||
argl = ["config", dev.serial or dev.unitId, setting.name]
|
argl = ["config", dev.serial or dev.unitId, setting.name]
|
||||||
argl.extend([a for a in [args.value_key, args.extra_subkey, args.extra2] if a is not None])
|
argl.extend([a for a in [args.value_key, args.extra_subkey, args.extra2] if a is not None])
|
||||||
args = yaml.dump(argl)
|
args = yaml.dump(argl)
|
||||||
application.run([args])
|
application.run(args)
|
||||||
else:
|
else:
|
||||||
if dev.persister and setting.persist:
|
if dev.persister and setting.persist:
|
||||||
dev.persister[setting.name] = setting._value
|
dev.persister[setting.name] = setting._value
|
||||||
|
|
|
||||||
|
|
@ -1153,7 +1153,6 @@ def update(device, is_online=None):
|
||||||
k = (device_id[0], device_id[1], s.name)
|
k = (device_id[0], device_id[1], s.name)
|
||||||
if k in _items:
|
if k in _items:
|
||||||
sbox = _items[k]
|
sbox = _items[k]
|
||||||
sbox.setting = s # use setting from current version of device
|
|
||||||
else:
|
else:
|
||||||
sbox = _create_sbox(s, device)
|
sbox = _create_sbox(s, device)
|
||||||
if sbox is None:
|
if sbox is None:
|
||||||
|
|
|
||||||
|
|
@ -157,17 +157,11 @@ MAIN_ANSI: tuple[Cell, ...] = (
|
||||||
Cell(zone_id=108, row=5, col=13, group="main", label="Ctrl"),
|
Cell(zone_id=108, row=5, col=13, group="main", label="Ctrl"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- Main alpha block, ISO. Drops the row 2 col 13 backslash (zone 46 is the
|
# --- Main alpha block, ISO. Same as ANSI minus the row 2 col 13 backslash;
|
||||||
# upper half of the L-shape Enter on ISO, addressed by zone 37) and adds
|
# on ISO that position is the top half of the L-shape Enter, addressed
|
||||||
# the two ISO-only keys: POUND (zone 47) at row 3 col 12 between ' and
|
# by zone 37 (the main Enter cell at row 3 col 13). Zone 46 is silently
|
||||||
# Enter, and ISO_BACKSLASH (zone 97) at row 4 col 1 between Shift and Z.
|
# unaddressable on ISO layouts — same limitation as OpenRGB's UI.
|
||||||
# Regional layouts override the labels to match local keycaps (# / < on
|
MAIN_ISO: tuple[Cell, ...] = tuple(c for c in MAIN_ANSI if not (c.row == 2 and c.col == 13))
|
||||||
# QWERTZ, # / \ on UK QWERTY, * / < on AZERTY).
|
|
||||||
_ISO_EXTRA_KEYS: tuple[Cell, ...] = (
|
|
||||||
Cell(zone_id=47, row=3, col=12, group="main", label="#"),
|
|
||||||
Cell(zone_id=97, row=4, col=1, group="main", label="\\"),
|
|
||||||
)
|
|
||||||
MAIN_ISO: tuple[Cell, ...] = tuple(c for c in MAIN_ANSI if not (c.row == 2 and c.col == 13)) + _ISO_EXTRA_KEYS
|
|
||||||
|
|
||||||
# --- Curated allowlist for unmapped device zones surfaced in the bottom strip.
|
# --- Curated allowlist for unmapped device zones surfaced in the bottom strip.
|
||||||
# G-keys, logo, media, brightness — the canonical "extras" Logitech firmware
|
# G-keys, logo, media, brightness — the canonical "extras" Logitech firmware
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,6 @@ _OVERRIDES: dict[int, str] = {
|
||||||
51: ";", # ,-position → semicolon
|
51: ";", # ,-position → semicolon
|
||||||
52: ":", # .-position → colon
|
52: ":", # .-position → colon
|
||||||
53: "!", # /-position → exclamation
|
53: "!", # /-position → exclamation
|
||||||
47: "*", # POUND key (row 3 col 12) — French * / µ
|
|
||||||
97: "<", # ISO_BACKSLASH (row 4 col 1), between Shift and W
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,6 @@ _OVERRIDES: dict[int, str] = {
|
||||||
49: "Ä", # row 3 col 11
|
49: "Ä", # row 3 col 11
|
||||||
26: "Y", # row 4 col 2 — Y/Z swap
|
26: "Y", # row 4 col 2 — Y/Z swap
|
||||||
53: "-", # row 4 col 11
|
53: "-", # row 4 col 11
|
||||||
47: "#", # POUND key (row 3 col 12), between Ä and Enter
|
|
||||||
97: "<", # ISO_BACKSLASH (row 4 col 1), between Shift and Y
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue