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

Add functions for greater control over axis remap #131

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

flamerten
Copy link

Based on Section 3.4 Axis Remap of the BNO055 Datasheet, 2 functions providing greater control of Axis remapping are provided.

  • configureAxisRemap allows the user to remap the X, Y and Z axis to another axis
  • configureAxisSign allows the user to remap the signs of the X, Y and Z axis.

Although the original library provides the functions setAxisRemap and setAxisSign, these functions are restrictive as they only allow the user to reconfigure the axis based on the example placements provided which would does not suit every use case.

The 2 functions above return bool values that indicate if the configuration was successful. This is done by reading the configuration registers and checking if the value read from the registers match the new values initially rewritten.

Also based on testing and this forum post, I realized that setExtCrystalUse can only be called after axis remapping. I feel this should be documented somewhere, as calling setExtCrystalUse before axis remapping would lead to axis remapping not working, with the default axis configurations applied instead of the new configuration.

@flamerten
Copy link
Author

This PR addresses #127

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.

1 participant