mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 04:30:36 +08:00
Simplify switch logic for validator
This commit is contained in:
@@ -151,7 +151,7 @@ DataValidatorGroup::get_best(uint64_t timestamp, int *index)
|
||||
if ((((max_confidence < MIN_REGULAR_CONFIDENCE) && (confidence >= MIN_REGULAR_CONFIDENCE)) ||
|
||||
(confidence > max_confidence && (next->priority() >= max_priority)) ||
|
||||
(fabsf(confidence - max_confidence) < 0.01f && (next->priority() > max_priority))
|
||||
) && (confidence > FLT_EPSILON)) {
|
||||
) && (confidence > 0.0f)) {
|
||||
max_index = i;
|
||||
max_confidence = confidence;
|
||||
max_priority = next->priority();
|
||||
|
||||
Reference in New Issue
Block a user