Closed benoit-pereira-da-silva closed 6 months ago
@maruel using mmr.Dev16 was not convenient. The adxl345 returns positive and negative int16 values. So i decided to keep the infamous :) conversion int16(binary.LittleEndian.Uint16(rx))
this implementation should work for most of the adxlXXX line so i ve enabled the ability to use another device by passing explicitly its Opts.ExpectedDeviceID.
Thanks for the change! Can you rebase it onto origin/main first?
Attention: 50 lines
in your changes are missing coverage. Please review.
Comparison is base (
931687b
) 62.5% compared to head (60fc493
) 61.7%.
Files | Patch % | Lines |
---|---|---|
adxl345/adxl345.go | 0.0% | 50 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Please prefix the issue title with the primary package affected. For example, if this PR fixes periph.io/x/devices/v3/cap1xxx, prefix the PR title with "cap1xxx:". adxl345: support both SPI and I²C.
Mention the issue number it fixes or add the details of the changes if it doesn't have a specific issue. Examples:
Once integrated, send a PR to https://github.com/periph/cmd to leverage the new functionality (if relevant).