Skip to content

Allow using different models together #16

Open
@Neradoc

Description

@Neradoc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions