sensors: simplify timestamp data validator handling

This commit is contained in:
Daniel Agar
2022-01-17 17:46:56 -05:00
parent 8067207ea6
commit b1d2a0cc4e
4 changed files with 21 additions and 21 deletions
@@ -105,7 +105,7 @@ float DataValidator::confidence(uint64_t timestamp)
_error_mask |= ERROR_FLAG_NO_DATA;
ret = 0.0f;
} else if (timestamp - _time_last > _timeout_interval) {
} else if (timestamp > _time_last + _timeout_interval) {
/* timed out - that's it */
_error_mask |= ERROR_FLAG_TIMEOUT;
ret = 0.0f;