Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hidpp10_constants.py: Remove dependency to NamedInts #25

Open
wants to merge 29 commits into
base: refactor_settings
Choose a base branch
from

Conversation

rloutrel
Copy link

It might be easier to merge it now than later

MattHag and others added 29 commits November 19, 2024 01:45
- Move validators into their own module.
- Convert Kind to IntEnum

Related pwr-Solaar#2273
Classes shouldn't don't need to know about other settings classes.

Related pwr-Solaar#2273
Enforce create_widgets and collect_values.

Related pwr-Solaar#2273
Refactor code related to task and task ID.

Related pwr-Solaar#2273
The key flags are solely used in hiddpp20 module, thus put them into the
module.

Related pwr-Solaar#2273
This data is not in use currently.

Related pwr-Solaar#2273
The mapping flags are solely used in hiddpp20 module, thus put them into
this module.

Related pwr-Solaar#2273
The charge status is solely used in the hiddpp20 module, thus put it
into this module.

Related pwr-Solaar#2273
Ensure behavior stays the same.

Related pwr-Solaar#2273
@MattHag
Copy link
Owner

MattHag commented Dec 1, 2024

I'll try to rebase it all on top of the latest Solaar version and merge in my master.

Then we can tackle the remaining left overs which can be tricky.

@MattHag MattHag force-pushed the refactor_settings branch 2 times, most recently from fc3e16f to 93a6aca Compare December 1, 2024 21:56
@MattHag
Copy link
Owner

MattHag commented Dec 20, 2024

Cherry-picked them in my pull request. Thanks

@MattHag MattHag closed this Dec 20, 2024
@MattHag MattHag reopened this Dec 21, 2024
@@ -55,7 +55,23 @@

FixedBytes5 = bytes

KIND_MAP = {kind: hidpp10_constants.DEVICE_KIND[str(kind)] for kind in DEVICE_KIND}
HIDPP10_DEVICE_KIND = NamedInts(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rloutrel Can you avoid this? It just reintroduces the NamedInts in another place.

@MattHag MattHag force-pushed the refactor_settings branch 6 times, most recently from 4a8f2a9 to e3bdd63 Compare December 27, 2024 13:04
@MattHag MattHag force-pushed the refactor_settings branch from e3bdd63 to 5333e0d Compare January 1, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants