Skip to content

Commit

Permalink
device: initialize device registers to empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Apr 19, 2024
1 parent 7550d6b commit 92c7d7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/logitech_receiver/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def __init__(self, receiver, number, online, pairing_info=None, handle=None, dev
self._tid_map = None # map from transports to product identifiers
self._persister = None # persister holds settings
self._led_effects = self._firmware = self._keys = self._remap_keys = self._gestures = None
self._profiles = self._backlight = self.registers = self._settings = None
self._profiles = self._backlight = self._settings = None
self.registers = []
self.notification_flags = None
self.battery_info = None
self.link_encrypted = None
Expand Down
2 changes: 1 addition & 1 deletion tests/logitech_receiver/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_Device_name(device_info, responses, codename, name, kind, mock_base):
[None, "Illuminated", "Craft", "G700", "MX Vertical", None],
[0xFF, 0x0, 0xFF, 0x0, 0xFF, 0xFF],
[1.0, 1.0, 4.5, 1.0, 4.5, 4.5],
[None, [], [], (common.NamedInt(7, "battery status"), common.NamedInt(81, "three leds")), [], None],
[[], [], [], (common.NamedInt(7, "battery status"), common.NamedInt(81, "three leds")), [], []],
),
)
def test_Device_info(device_info, responses, handle, _name, _codename, number, protocol, registers, mock_base):
Expand Down

0 comments on commit 92c7d7b

Please sign in to comment.