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

Allow using different models together #16

Open
Neradoc opened this issue Jun 7, 2022 · 0 comments
Open

Allow using different models together #16

Neradoc opened this issue Jun 7, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Neradoc
Copy link

Neradoc commented Jun 7, 2022

Because the class-level properties of AccelRange and GyroRange are defined when the ICM20948 and ICM20649 are inited, the values overwrite each other if you use both in the same code. The values differ between both models (eg: RANGE_4G is 0 on ICM20649 and 1 on the other), and which values are allowed varies too. One solution would be to have them defined globally with all the values and have each model have its own translation table of allowed values. That would still allow using AccelRange.RANGE_4G in user code.
While an edge case, it was reported on discord.

@tekktrik tekktrik added the bug Something isn't working label Jan 10, 2023
@tekktrik tekktrik self-assigned this Jan 10, 2023
@tekktrik tekktrik removed their assignment May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants