Commit Graph

92 Commits

Author SHA1 Message Date
Alban Browaeys 41ba24eee2 Complete DEVICE_FEATURES to DeviceFeature transition for hidpp10 devices
Fixes solaar show.

Fixes: 378175f9 Remove NamedInts: Convert DeviceFeature to flag
2025-04-07 10:24:13 -04:00
Alban Browaeys ed596666ee Fix NOTIFICATION_FLAG to NotificationFlag transition leftovers
Fixes "solaar show" for hidpp10 device (or at least for 27MHz FastRF
hidpp10 peripherals).

Fixes: 72c9dfc5 Remove NamedInts: Convert NotificationFlag to flag
2025-04-07 10:24:13 -04:00
DomHeadroom 90ab457ebe Rewrote string concatenation/format with f strings 2025-01-29 08:40:14 -05:00
MattHag 918b584b95 macOS: Fix int.from_bytes, int.to_bytes for show.py
Related #2729
2025-01-01 11:55:10 -05:00
MattHag ad3916e1b8 Fix KeyFlag conversion 2025-01-01 10:46:04 -05:00
MattHag d27f7285e0 Remove NamedInts: Convert MappingFlag to flag
Related #2273
2025-01-01 10:46:04 -05:00
Peter F. Patel-Schneider 87afc3659e cli: handle fake feature enums in show 2024-12-24 10:29:55 -05:00
MattHag c90146df31
Refactor: hidpp20 to use enum (#2647)
* Remove duplicated Param definition

Use constants from hidpp20 constants

Related #2273

* hidpp20/Param: Refactor to use IntEnum

Related #2273

* hidpp20_constants: Refactor to use IntEnum

Related #2273
2024-11-02 08:33:58 -04:00
MattHag 1afcfe4b57
refactor: use IntEnum for firmware and cidgroup constances
* Refactor: test_named_ints_flag_names

Shorten test and clarify behavior using binary numbers.

* Introduce plain flag_names function

This replicates the NamedInts functionality as plain function.

* Refactor FeatureFlag to use IntFlag

Replace NamedInts implementation with IntFlag enum and plain flag_names
function.

Related #2273

* Refactor FirmwareKind to use IntEnum

- Move general FirmwareKind to common module.
- Replace NamedInts implementation with IntEnum.
- Harden related HIDPP 1.0 get_firmware test.

Related #2273

* Refactor CID_GROUP, CID_GROUP_BIT to use IntEnum

Related #2273
2024-10-23 16:25:35 -04:00
MattHag 0cd9c0c9b5 Refactor: Introduce Feature enum
Convert Feature NamedInts to SupportedFeature integer enum.

Related #2273
2024-10-14 07:28:09 -04:00
MattHag 67829c5807
Clean up imports (#2537)
* Remove import as _ in solaar startup

Related #2273

* Remove import as _ in listener

Related #2273

* Remove import as _ in cli init

Related #2273

* Remove import as _ in gtk

Related #2273

* Remove import as _ in show

Related #2273

* Remove import as _ in tray

Related #2273

* Remove import as _ in profiles

Related #2273

* Remove import as _ in config

Related #2273

* Remove import as _ in config panel

Related #2273

* Remove import as _ in window

Related #2273

* Remove import as _ in pair

Related #2273

* Remove import as _ in pair window

Related #2273

* Remove import as _ in cli package

Related #2273

* Remove import as _ in ui package

Related #2273

* Remove commented out code

Related #2273

* Use constant for Logitech ID
2024-07-15 08:37:18 -04:00
Peter F. Patel-Schneider a7784b40ab cli: finish change to show.py for new constants 2024-06-13 05:54:36 -04:00
Matthias Hagmann 193dbfda21 hidpp10: Move independent functions to module level 2024-05-22 21:14:41 -04:00
Matthias Hagmann 6f613b17c7 refactor: Manually improve f-string formatting 2024-03-24 07:01:56 -04:00
Matthias Hagmann 4e6361429e refactor: Use f-strings for more exceptions and log message
Semi manually convert remaining strings with no translation to f-string.
2024-03-24 07:01:56 -04:00
Peter F. Patel-Schneider d76eed85f6 device: fix bug in setting configuration cookie due to bad documentation 2024-03-14 17:06:17 -04:00
Matthias Hagmann 5b09ace1f5 ruff: Apply single line import format
# Usage
pre-commit run --all-files

Related #2295
2024-03-13 15:41:21 -04:00
Matthias Hagmann e92f1a8a0b Automatically upgrade strings to f-string
Used flynt to convert strings to f-strings, where safely possible.

Usage:
flynt .

Related #2372
2024-03-13 11:02:50 -04:00
Peter F. Patel-Schneider b957217ea8 receiver: delay device sending first messages 2024-03-13 08:34:28 -04:00
Peter F. Patel-Schneider f3ff61cfc1 cli: fix bug in building battery line in show 2024-03-11 15:20:39 -04:00
Swapnil Devesh 5ee1c6df30
ui: fix app name casing in UI
* Fix app name casing in UI

* Linter fixes

* Only use NAME variable

* FIx linter errors
2024-03-05 12:08:56 -05:00
Matthias Hagmann 9c76a6c5ba refactor: Introduce Hidpp20 class
Related #1097
2024-03-02 10:56:41 -05:00
Matthias Hagmann 85149a809e refactor: Introduce Hidpp10 class
Related #1097
2024-03-02 10:56:41 -05:00
Matthias Hagmann 7ef3059b69 clean up: Remove editor specific marks
Related #2273
2024-02-29 10:10:46 -05:00
Matthias Hagmann 7774569971 Apply ruff format
Run ruff auto formatting using:
ruff format .

Related #2295
2024-02-20 15:41:10 -05:00
Peter F. Patel-Schneider 476f41f8ae logitech_receiver: style fixes 2024-02-20 05:58:33 -05:00
Matthias Hagmann 5f487dd3b2 logitech_receiver: Move hidpp20 constants into new module
Related #1097
2024-02-20 05:58:33 -05:00
Matthias Hagmann 2fcab65486 logitech_receiver: Move hidpp10 constants into new module
Related #1097
2024-02-20 05:58:33 -05:00
Matthias Hagmann e8fdbeee8e logitech_receiver: Move exceptions into own module
Related #1097
2024-02-20 05:58:33 -05:00
Peter F. Patel-Schneider df9a5b7b19 cli: catch assertion errors when reading setting values from devices 2024-02-10 09:15:27 -05:00
Peter F. Patel-Schneider 06209d238a cli: no numbers for USB and Bluetooth devices 2024-02-04 14:20:52 -05:00
Peter F. Patel-Schneider a6f7507ce6 ui: use Report Rate instead of Polling for movement report rate 2024-02-01 10:13:03 -05:00
Peter F. Patel-Schneider db4e40e3ac device: add extended report rate setting 2024-02-01 10:13:03 -05:00
Peter F. Patel-Schneider f8a462dbe5 cli: be defensive in device error message 2024-01-28 15:36:28 -05:00
Peter F. Patel-Schneider eb6bacaed1 cli: handle NoSuchDevice exception when pinging device 2023-11-19 12:04:02 -05:00
Peter F. Patel-Schneider fe901fe3c2 device: more robust access to keyword exception fields 2022-12-06 14:20:59 -05:00
Peter F. Patel-Schneider 3a6b479e8b cli: print feature call errors in solaar show instead of terminating 2022-09-25 12:22:36 -04:00
Peter F. Patel-Schneider 76afec5c82
cli: show features versions in solaar show (#1709) 2022-08-20 12:34:15 -04:00
Peter F. Patel-Schneider 83eb836177 device: regularize and improve battery status gathering and reporting 2022-07-10 11:08:28 -04:00
Peter F. Patel-Schneider 4459ea5342 device: improve device features handling 2022-04-26 09:03:20 -04:00
Peter F. Patel-Schneider d115ade2ea setting: add setting to divert gestures 2022-03-16 20:22:25 -04:00
Peter F. Patel-Schneider d646e18543 settings: add setting for PERSISTENT_REMAPPABLE_ACTION 2022-03-12 12:20:38 -05:00
Peter F. Patel-Schneider 12ecef004e receiver: gather and show PERSISTENT_REMAPPABLE_ACTION information 2022-03-12 12:20:38 -05:00
Peter F. Patel-Schneider f938d3430e cli: nicer output of settings in solaar show and solaar config 2022-01-24 21:12:55 -05:00
Peter F. Patel-Schneider 79606c530b receiver: use feature numbers for reprogrammable key versions 2021-12-26 11:21:48 -05:00
Peter F. Patel-Schneider 8ab062363e cli: add version to output of solaar show 2021-12-23 14:44:05 -05:00
Hugo Osvaldo Barrera 22bf4fafff Drop unnecessary __future__ imports
These are all active by default on all recent Python versions.
2021-10-30 16:49:41 -04:00
Hugo Osvaldo Barrera b96d16672b Drop obsolete encoding declaration
This was only parsed in Python 2.
Python 3 only supports UTF-8 for source files, and that's what it uses.
2021-10-30 16:49:41 -04:00
Peter F. Patel-Schneider c5ef207961 device: use first word of name for code name if friendly name not available 2021-08-31 19:05:57 -04:00
Peter F. Patel-Schneider a7ddb3efdd cli: allow for new_fn_inversion call to fail 2021-08-31 19:05:57 -04:00