-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
Support high-resolution sampling on ICM4xxxx IMUs #25069
Conversation
47707e3
to
a6b6357
Compare
Flown on my 5" quad no issues |
@andyp1per I'd like a discuss a bit, particularly regarding testing on all the v3 variants, and if we need the parameter or should just always enable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few changes:
- needs to be under an #if, enabled in hwdef.dat
- needs careful testing on all supported IMUs
- need to test with raw 32kHz fifo logging to ensure this is really a benefit, with logging of the raw 32bit signed number
- we need to check if enabling high res changes gyro or accel offsets
enable high-resolution support on all ICM4xxxx sensors create INS_HIRES_SAMPLE mask adjust high-resolution sampling for correct byte ordering and depth correct high resolution scaling on 18bit ICM4xxxx IMUs control highres via HAL_INS_HIGHRES_SAMPLE
…nsors active on ICM-42688
we use the instance numbers during filter configuration to check if fast sampling is enabled. We need to ensure these instance numbers have been setup before the filtering functions get called
we need to rotate the data so that FFT displays match the configured orientation
ee3124a
to
2f933cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moving to an enum class will help
ICM42688, IIM42652, ICM42670, ICM45686 support higher resolution gyro and accel data in the FIFO. This higher resolution is particularly useful on large range devices (ICM45686) and prevents the quantization that would otherwise occur with these devices.
High-resolution support is enabled via
INS_HIRES_SAMPLE
which is a mask that can be used in a similar way toINS_FAST_SAMPLE
This also fixes a bug with filter setup where we were relying on device ids that had not yet been set.
This work was sponsored by CubePIlot