Skip to content

Add calibration offsets and radii as properties on BNO055 library #30

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

Merged
merged 6 commits into from
Jan 22, 2020

Conversation

sjirwin
Copy link

@sjirwin sjirwin commented May 12, 2019

issue #21

builds on work by @katlings and replaces her PR
implements the approach suggested by @deshipu and addresses feedback from @caternuson

note - assignment is fighting against BNO055 auto-calibration so can have odd behavior

Adafruit CircuitPython 4.0.0-rc.1 on 2019-04-23; Adafruit Feather M4 Express with samd51j19
>>> import board, busio
>>> import adafruit_bno055 as bno055
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> bno = bno055.BNO055(i2c)
>>> bno.radius_magnetometer
0
>>> bno.radius_magnetometer = 40
>>> bno.radius_magnetometer = 40
>>> bno.radius_magnetometer
1
>>> bno.radius_magnetometer
0
>>> bno.offsets_accelerometer = 1, -1, 1
>>> bno.offsets_accelerometer
(1, -1, 1)

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty good. Looks like the type checks need to be swapped to isinstance() for lint.

@caternuson
Copy link
Contributor

note - assignment is fighting against BNO055 auto-calibration so can have odd behavior

I think that has to do with running in one of the "sensor fusion" modes, like NDOF.

bno055_1
bno055_2

The previous driver didn't do any checking for current mode. Not sure if that's worth adding here?

@evaherrada
Copy link
Collaborator

@caternuson this seems like something useful, as long as the auto-calibration doesn't mess with it. Is this something we should see about merging or close?

@caternuson
Copy link
Contributor

Maybe have it as a follow on PR, with a new issue for tracking, just so we can get this PR closed off.

@kattni
Copy link
Contributor

kattni commented Jan 8, 2020

@caternuson Are you able to test this if you have not already?

@caternuson
Copy link
Contributor

caternuson commented Jan 8, 2020

@kattni I didn't test this. Looks like that was notionally done in first post above. I can if you want me to though. In general, I'm OK with this once it passes travis. I think that's where things stalled.

EDIT - oh wait, that was done. @tannewt You OK with the changes?

@kattni
Copy link
Contributor

kattni commented Jan 22, 2020

@tannewt Can you please approve these changes if you're satisfied? Thanks!

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

@tannewt tannewt merged commit 2e9716c into adafruit:master Jan 22, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jan 28, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_BME680 to 3.1.3 from 3.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_BME680#18 from markpatterson27/upstream-issue-12

Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO055 to 4.1.0 from 4.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_BNO055#30 from sjirwin/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_HT16K33 to 3.2.0 from 3.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#56 from makermelissa/set_digit_raw
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#55 from makermelissa/set_digit_raw
  > Merge pull request adafruit/Adafruit_CircuitPython_HT16K33#53 from hybotics/port_number_change_from_micropython

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3MDL to 1.0.1 from 1.0.0:
  > Update README.rst

Updating https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI to 0.3.3 from 0.3.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_NeoPixel_SPI#10 from caternuson/pypix

Updating https://github.com/adafruit/Adafruit_CircuitPython_PyPortal to 3.1.7 from 3.1.6:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#34 from colonwq/add_sdcheck

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE to 5.0.3 from 5.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE#65 from dhalbert/update-dis

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_Apple_Notification_Center to 0.8.2 from 0.8.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_Apple_Notification_Center#4 from tannewt/remove_ble_mock
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.

7 participants