Compare commits

...

6 Commits

Author SHA1 Message Date
MattHag e6b8f58233
Merge b2b032d8bf into 137dd6b2ff 2025-10-15 03:06:02 +02:00
MistificaT0r 137dd6b2ff update Russian translation 2025-10-14 19:25:57 -04:00
MattHag b2b032d8bf
Merge branch 'master' into fix_2827 2025-09-20 13:17:34 +02:00
Peter F. Patel-Schneider 985e1fe889
Merge branch 'master' into fix_2827 2025-04-07 10:44:26 -04:00
Peter F. Patel-Schneider dd63ffef16
Merge branch 'master' into fix_2827 2025-04-05 20:41:45 -04:00
MattHag 534d8125ea Fix: Show pairing error str
Fixes #2827
2025-03-15 21:57:47 +01:00
5 changed files with 1047 additions and 1002 deletions

View File

@ -156,6 +156,10 @@ class PairingError(IntEnum):
TOO_MANY_DEVICES = 0x03
SEQUENCE_TIMEOUT = 0x06
@property
def label(self) -> str:
return self.name.lower().replace("_", " ")
class BoltPairingError(IntEnum):
DEVICE_TIMEOUT = 0x01

View File

@ -433,7 +433,8 @@ def handle_pairing_lock(receiver: Receiver, notification: HIDPPNotification) ->
receiver.pairing.new_device = None
pair_error = ord(notification.data[:1])
if pair_error:
receiver.pairing.error = error_string = hidpp10_constants.PairingError(pair_error).name
error_string = hidpp10_constants.PairingError(pair_error).label
receiver.pairing.error = error_string
receiver.pairing.new_device = None
logger.warning("pairing error %d: %s", pair_error, error_string)
receiver.changed(reason=reason)

1017
po/ru.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,7 @@ import pytest
from logitech_receiver import common
from logitech_receiver import hidpp10
from logitech_receiver import hidpp10_constants
from logitech_receiver.hidpp10_constants import PairingError
from logitech_receiver.hidpp10_constants import Registers
_hidpp10 = hidpp10.Hidpp10()
@ -338,3 +339,11 @@ def test_set_configuration_pending_flags(device, expected_result):
result = hidpp10.set_configuration_pending_flags(device, 0x00)
assert result == expected_result
def test_pairing_error():
expected_label = "device not supported"
res = PairingError.DEVICE_NOT_SUPPORTED.label
assert res == expected_label