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

first reading in loop wrong #26

Closed
rictolcrow opened this issue Oct 15, 2021 · 1 comment
Closed

first reading in loop wrong #26

rictolcrow opened this issue Oct 15, 2021 · 1 comment

Comments

@rictolcrow
Copy link
Contributor

https://github.com/floodsense/floodsense_sensor/blob/0db0efaf8eafbbec5f2b7618c8418ed5ae939a7c/src/maxbotix.cpp#L73

The first reading in loop is always in error making the mean functions useless. No effect on median and mode.

Suggested fix is to flip lines 74 and 75 and possibly lines 70 and 71. I tried it and it fixes the bug

@Praneethsvch
Copy link
Collaborator

ac3409e first reading bug is fixed by adding an extra read. Bug is due to the 'R's in the startup serial output; "MAXBOTIX CORPORATION INC"

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