Skip to content

Commit

Permalink
set best sensor to -1 after last sensor fails
Browse files Browse the repository at this point in the history
  • Loading branch information
haumarco committed Jul 22, 2024
1 parent 36d89df commit 530950e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modules/sensors/data_validator/DataValidatorGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ float *DataValidatorGroup::get_best(uint64_t timestamp, int *index)
if (_first_failover_time == 0) {
_first_failover_time = timestamp;
}

if (max_confidence < FLT_EPSILON) {
max_index = -1;
}
}
}

Expand Down

0 comments on commit 530950e

Please sign in to comment.