Commit Graph

20 Commits

Author SHA1 Message Date
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
MattHag 741c0861c2 Clarify that fake hidpp is used
This module shouldn't be necessary on the long run. Remove pieces from
it whenever possible.
2024-10-08 14:35:16 -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 1eb1d4b198 tests: extend tests for device.py 2024-04-13 18:38:44 -04:00
Peter F. Patel-Schneider c7195881e3 tests: expand tests for device.py 2024-04-13 18:38:44 -04:00
Peter F. Patel-Schneider c7a2f1698b tests: extend testing of hidpp20 2024-04-13 18:38:44 -04:00
Peter F. Patel-Schneider c283da27df tests: extend testing of hidpp20 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 12f3f2e856 tests: adjust imports to always import installed version 2024-03-27 18:02:55 -04:00
Peter F. Patel-Schneider 89b7fb6ef3 tests: add tests for LEDEffect structures in hidpp20 2024-03-24 15:44:15 -04:00
Peter F. Patel-Schneider 10e3f844dd tests: use hidpp module in several test modules 2024-03-23 08:26:12 -04:00
Peter F. Patel-Schneider e0047024a5 tests: use 3.7 type hint 2024-03-16 16:20:39 -04:00
Peter F. Patel-Schneider 6164317a64 tests: improve hidpp20 coverage 2024-03-16 16:20:39 -04:00
Peter F. Patel-Schneider d5bdf2b0f5 tests: complete testing of common 2024-03-13 16:08:16 -04:00
Peter F. Patel-Schneider 54ee78ee25 tests: start coverage of complex structures in hidpp20 2024-03-13 16:08:16 -04:00