-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add more configuration options #5
Comments
Sounds like a nice project. I would welcome this in a PR. |
* /issues/5 Add accel, gyro range and types * /issues/5 Changelog and README with range types and methods * Add function get scaled output values * Adress review comments * Update changelog * Address review comments from #8 * Add tests for setting gyro and acc range * Add integration test --------- Co-authored-by: Mike <[email protected]>
#9 added functions to set the gyro and acc scales and read the scaled sensor values. I'm now looking into setting the The I was thinking this relationship could be captured with enums: struct AccelerometerConfig {
undersampling_mode: AccelerometerUndersamplingMode,
output_data_rate: AccelerometerOutputDataRate
}
enum AccelerometerUndersamplingMode {
Disabled(FilterMode),
Enabled(AveragedSamples),
}
enum FilterMode {
Normal,
OSR2,
OSR4,
}
enum AveragedSamples {
One,
Two,
Four,
// etc
}
enum AccelerometerOutputDataRate {
Odr25Hz,
Odr50Hz,
// etc.
} This feels a little clunky so I'm open to alternatives. The |
That is also what I thought of. I could not immediately think of something simpler that does not lead to returning |
Coming from Zephyr (and it's BMI160 library), there are two features that seem to be missing that would be really nice to have:
The text was updated successfully, but these errors were encountered: