-
Notifications
You must be signed in to change notification settings - Fork 53
Possible fix for #11 #15
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
Conversation
Would like someone to review, didn't setup hardware tests yet. Will do so when I have more time. Thanks for the Hacktoberfest tag!
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.
Looks good. The changes requested are mainly cosmetic.
adafruit_bno055.py
Outdated
accel = (calibration_data >> 2) & 0x03 | ||
mag = calibration_data & 0x03 | ||
return sys, gyro, accel, mag | ||
|
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.
Being able to get the individual status's might be useful. Change this to a property called calibration_status
, still returning the same tuple.
if sys < 3 or gyro < 3 or accel < 3 or mag < 3: | ||
return False | ||
return True | ||
|
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.
Change name to simply calibrated
. And a python-y way to do the check and return is:
return sys == gyro == accel == mag == 0x03
Also - the doc strings for properties should read like a variable, not a function. So instead of describing what it does ("Returns..."), describe what it is ("The status of...").
Thank you for the review. I've made the requested changes. This is helping me understand Python decorators better too. 👍 |
Thanks for the update! |
Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO055 to 3.0.4 from 3.0.3: > Merge pull request adafruit/Adafruit_CircuitPython_BNO055#15 from davidskeck/patch-1 > ignore the board module imports in .pylintrc
Would like someone to review, didn't setup hardware tests yet. Will do so when I have more time. Thanks for the Hacktoberfest tag!