MattHag
862cef1f77
hidpp20_constants: Refactor Gesture into enum
...
Replace Gesture NamedInts with enum.
Related #2273
2024-11-03 14:41:07 -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
46366b2430
Fix warnings from automatic code inspections
...
Warnings found by automatic code inspection and partially tackled
- Drop distuitls inf favour of setuptools
- Replace deprecated pyudev.Device.from_device_number
- Remove unnecessary brackets
- Avoid access to private variables etc.
- Shadows built-in name
- Line length >120 characters
- Not a module level variable
- Simplify clause
and more
2024-10-11 07:42:38 -04:00
Peter F. Patel-Schneider
c07c30baef
device: handle error return on root feature
2024-08-23 19:41:10 -04:00
Peter F. Patel-Schneider
d9d67ed738
device: handle unknown device kinds
2024-07-02 10:59:16 -04:00
MattHag
815dce07be
Unify imports in logitech package
...
Related #2273
2024-05-23 16:42:18 -04:00
Matthias Hagmann
c9dc232951
Refactor: Use dataclasses and enums
...
Replace unnecessary NamedInts in favour of default data types.
Simplify interfaces by reducing possible input from strings to members
of an enum.
2024-05-22 21:14:41 -04:00
Matthias Hagmann
469c04faaf
Introduce Device protocol and type hints
2024-05-22 21:14:41 -04:00
MistificaT0r
4225fce8d7
po: update Russion translation and have all strings translated
...
* update Russian translation
* Fixed translation display in GUI
* fix checks / Fixed translation display in GUI
2024-04-21 11:36:39 -04:00
Peter F. Patel-Schneider
d7ce636917
device: handle a different signal for onboard profiles directory in ROM
2024-04-15 14:40:50 -04:00
Peter F. Patel-Schneider
d6499808f9
device: fix bugs in onboard profiles found during testing
2024-04-13 18:38:44 -04:00
Peter F. Patel-Schneider
3855409605
device: fix bugs in hidpp20 found during testing
2024-04-13 18:38:44 -04:00
Peter F. Patel-Schneider
d12575b47d
tests: test GESTURES settings
2024-04-13 18:38:44 -04:00
Peter F. Patel-Schneider
e64eec18e9
tests: extend testing of hidpp20
2024-04-13 18:38:44 -04:00
Peter F. Patel-Schneider
b43cdace79
tests: expand tests for settings_templates
2024-04-09 10:31:06 -04:00
Peter F. Patel-Schneider
8de3a1d2e2
device: better support for extended ajustable dpi
2024-04-09 10:31:06 -04:00
Peter F. Patel-Schneider
c70e8b54bf
tests: remove unused code
2024-03-27 18:02:55 -04:00
Peter F. Patel-Schneider
e202e904b4
settings: add settings for RGB EFFECTS feature
2024-03-24 15:44:15 -04:00
Peter F. Patel-Schneider
c8288a6b69
settings: fix bug in LEDZoneSetting when effect is not implemented
2024-03-24 15:44:15 -04:00
Peter F. Patel-Schneider
c81809bd39
device: add RGB EFFECTS feature version of LED COLOR EFFECTS data
2024-03-24 15:44:15 -04:00
Peter F. Patel-Schneider
4fd75a64ff
settings: fix small bugs found from testing
2024-03-24 07:02:39 -04:00
Peter F. Patel-Schneider
47ba1402ed
device: use feature_request from the device everywhere in hidpp20
2024-03-23 10:11:30 -04:00
Peter F. Patel-Schneider
6164317a64
tests: improve hidpp20 coverage
2024-03-16 16:20:39 -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
dfd3d10c2e
device: optimize some functions in FeaturesArray
2024-03-12 12:21:17 -04:00
Peter F. Patel-Schneider
0b599194d1
device: fix bug in creating features array
2024-03-11 15:20:39 -04:00
Peter F. Patel-Schneider
24223e77c7
device: fix bug in getting friendly name
2024-03-11 08:23:27 -04:00
Peter F. Patel-Schneider
64d8cad81a
device: change status battery fields to Battery objects
2024-03-09 10:36:40 -05:00
Matthias Hagmann
fb9dbb9c39
update: Replace legacy logger.warn with logger.warning
...
Related #1097
2024-03-02 10:56:41 -05:00
Matthias Hagmann
9c76a6c5ba
refactor: Introduce Hidpp20 class
...
Related #1097
2024-03-02 10:56:41 -05:00
Peter F. Patel-Schneider
ce2de71b1b
device: clean up device and receiver code
2024-02-22 09:57:02 -05:00
Peter F. Patel-Schneider
646ef2f596
device: move battery constants common to HID++ 1.0 and 2.0 to common
2024-02-22 09:57:02 -05:00
Peter F. Patel-Schneider
24ae9bacaa
device: move mapping of device kind into hidpp20
2024-02-22 09:57:02 -05:00
Peter F. Patel-Schneider
68b62a9ee4
device: fix bug in hidpp20 get host names
2024-02-21 16:04:32 -05:00
Matthias Hagmann
04e709b00a
Remove yapf exclusions
...
Related #2295
2024-02-20 15:41:10 -05:00
Matthias Hagmann
eb937fcc3a
Manually fix linter issues
...
Related #2295
2024-02-20 15:41:10 -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
e8fdbeee8e
logitech_receiver: Move exceptions into own module
...
Related #1097
2024-02-20 05:58:33 -05:00
Peter F. Patel-Schneider
20a76fb4d3
device: improve features array
2024-02-18 08:21:09 -05:00
Peter F. Patel-Schneider
d1c899d6da
solaar: improve imports and guard Gtk, etc imports with correct version
...
solaar: move imports to top of files
solaar: move more imports to top of files
solaar: guard Gtk, etc imports with correct version
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider
0f0de28e94
device: correctly handle profile button with no action
2024-02-10 14:45:00 -05:00
MattHag
87658fb189
logging: Simplify logger instantiation
...
* logging: Simplify logger instantiation
Relates #2254
* logging: Remove aliases
Relates #2254
* logging: Replace deprecated warn with warning
Related #2254
* logging: Fix mistake
Related #2257
2024-02-10 13:55:27 -05:00
Peter F. Patel-Schneider
23517048d4
device: clean up data for LED effects
2024-02-09 08:36:36 -05:00
Peter F. Patel-Schneider
7c441cc652
ui: better startup behavior for LED effect settings
2024-02-09 08:36:36 -05:00