From 92ff391c9765a394fdf3ef81d0e9bc6985ef8f07 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 1 Aug 2018 14:19:51 -0400 Subject: [PATCH] ekf2 fix GPS fix_type comparison - fixes Coverity CID 306253 --- src/modules/ekf2/ekf2_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ekf2/ekf2_main.cpp b/src/modules/ekf2/ekf2_main.cpp index 924bf7fd57..3d95dd3c63 100644 --- a/src/modules/ekf2/ekf2_main.cpp +++ b/src/modules/ekf2/ekf2_main.cpp @@ -1004,7 +1004,7 @@ void Ekf2::run() } else { // handle case where the blended states cannot be updated - if (_gps_state[0].fix_type > _gps_state[0].fix_type) { + if (_gps_state[0].fix_type > _gps_state[1].fix_type) { // GPS 1 has the best fix status so use that _gps_select_index = 0;