Spurious low LMT01 pulse are sometimes seen, ignore them.

This commit is contained in:
Justifiably 2020-07-01 13:58:31 +01:00
parent 618d86078c
commit dcb57d11e3
1 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,8 @@ int LMT01_getPulses(void) {
hold = lmt01_pulseCount;
delay(1);
}
if (timeout > 0) {
// discard spurious low counts
if (timeout > 0 && hold >= 10) {
return hold;
}
return -1;