mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-26 10:40:35 +08:00
Validator: Reject data with no timestamp
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user