From 6752ecac5794187d66337448a932a4fba4db4666 Mon Sep 17 00:00:00 2001 From: Will Silva Date: Tue, 18 Oct 2016 11:08:32 -0700 Subject: [PATCH] AP_GPS: Don't run GPS re-detection logic if `_ublox_no_fix` is enabled --- libraries/AP_GPS/AP_GPS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index ce4d619d7a..631372080b 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -341,7 +341,7 @@ AP_GPS::update_instance(uint8_t instance) // has expired, re-initialise the GPS. This will cause GPS // detection to run again if (!result) { - if (tnow - timing[instance].last_message_time_ms > 1200) { + if (tnow - timing[instance].last_message_time_ms > 1200 && !_ublox_no_fix) { // free the driver before we run the next detection, so we // don't end up with two allocated at any time delete drivers[instance];