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

Feat: Add CC2 support #11

Merged
merged 2 commits into from
Mar 29, 2025
Merged

Feat: Add CC2 support #11

merged 2 commits into from
Mar 29, 2025

Conversation

Raymo111
Copy link
Member

No description provided.

@Raymo111 Raymo111 requested a review from GetPsyched November 10, 2024 05:54
@GetPsyched
Copy link
Collaborator

Summary:

The chipset is no longer a one-to-one mapping with the vendor ids. I updated @Raymo111's commit to move the chipset away from the product id decorator and instead something that's assigned within each class' __init__ method. Semantically, this makes the most sense to me that a device's class should be the one to figure out its own chipset. This being in the decorator made sense but it mixed with the product id logic, which isn't nice; I would instead prefer it to be a separate decorator that handles chipsets, but parsing a mapping in __init__ of the respective class makes more sense to me than an external method.

Sorry for bikeshedding over such a simple change; I sometimes* obsess over semantics :)

@GetPsyched
Copy link
Collaborator

Note to @Raymo111, don't merge this. If you approve, just approve and I'll rebase to pop the older commit, add you as a co-author on mine and then merge.

@GetPsyched GetPsyched removed their request for review March 29, 2025 10:50
Copy link
Member Author

@Raymo111 Raymo111 left a comment

Choose a reason for hiding this comment

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

LGTM

@Raymo111
Copy link
Member Author

Note to @Raymo111, don't merge this. If you approve, just approve and I'll rebase to pop the older commit, add you as a co-author on mine and then merge.

Can't we just squash merge

@GetPsyched GetPsyched merged commit c32a24d into master Mar 29, 2025
2 checks passed
@GetPsyched GetPsyched deleted the Add-CC2-support branch March 29, 2025 20:26
@GetPsyched
Copy link
Collaborator

Note to @Raymo111, don't merge this. If you approve, just approve and I'll rebase to pop the older commit, add you as a co-author on mine and then merge.

Can't we just squash merge

Yeah, the reason I said that initially was because of this line:

self.bootloader_mode = self.product_id == 0x8254

This wasn't there before; I thought I had missed it in some other class so I wanted that to be a separate commit. I realised now that it was missing in the new CC2 class, which obv is fine to be in the same commit if squashed.

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.

3 participants