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

Distance Mask Incorrect? #5

Closed
franksmicro opened this issue Apr 21, 2013 · 1 comment
Closed

Distance Mask Incorrect? #5

franksmicro opened this issue Apr 21, 2013 · 1 comment

Comments

@franksmicro
Copy link

Thanks for the library. I bought a sensor and was using it yesterday. I believe however that there is an issue in returning the distance.

I think the mask for distance should be:

define AS3935_DISTANCE 0x07, 0x3F

instead of the present

define AS3935_DISTANCE 0x07, 0x1F

From the AS3935 spec sheet:
DISTANCE [5:0] R 000000 Distance estimation

The 1F mask only allows 5 bits instead of 6, so distances returned would always be less than 32km instead of the 63km range of the chip.

Let me know if I am correct about this.

Thanks,
Frank

@raivisr
Copy link
Owner

raivisr commented Apr 21, 2013

Thank you, duly noted and fixed.

@raivisr raivisr closed this as completed Apr 21, 2013
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

No branches or pull requests

2 participants