adafruit / Adafruit_BNO08x

Arduino library for BNO08x
Other
37 stars 14 forks source link

Update Adafruit_BNO08x.cpp #16

Open kimpik opened 2 years ago

kimpik commented 2 years ago

Check the length field of the header for invalid packet.

In the original implementation, the I2C read function check the length field of the initial 4-byte header. The same check should apply to subsequent packets.

ladyada commented 2 years ago

hiya! thanks so much for submitting a PR! we can review & merge PRs once they have passed continuous integration (CI). that means that code compiles cleanly for all tested platforms, is clang formatted so we maintain the same text formatting for all new code, and is doxygen documented. if your code isnt passing, check the CI output (click on the red X next to the PR to scroll through the log and find where the error is

here is a tutorial on doxygen: https://learn.adafruit.com/the-well-automated-arduino-library/doxygen

and clang-format: https://learn.adafruit.com/the-well-automated-arduino-library/formatting-with-clang-format

and overall how to contribute PRs to libraries: https://learn.adafruit.com/contribute-to-arduino-with-git-and-github

once you get that green checkmark that indicates CI has passed, please comment reply to this post so we know its time for another review (we may not get notified on CI pass and miss that its time to look!)

kimpik commented 2 years ago

CI has passed. It is ready to be reviewed. thanks.