Validator: Reject data with no timestamp

This commit is contained in:
Lorenz Meier
2015-06-27 16:02:03 +02:00
parent 1148ba4a77
commit 7feb25bf58
+5
View File
@@ -155,6 +155,11 @@ DataValidator::put(uint64_t timestamp, float val[3], uint64_t error_count_in)
float
DataValidator::confidence(uint64_t timestamp)
{
/* check if we have any data */
if (_time_last == 0) {
return 0.0f;
}
/* check error count limit */
if (_error_count > _noreturn_errcount) {
return 0.0f;