From 2ee052b36e82c3d466c4318498b557ec80671f00 Mon Sep 17 00:00:00 2001 From: E Thomas Date: Sun, 15 Sep 2019 02:19:19 -0400 Subject: [PATCH] AP_GPS: Made GPS_DISABLE prevent last_fix_time_ms updates --- libraries/AP_GPS/AP_GPS.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index ee1f74b717..4bd86d8e11 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -810,7 +810,8 @@ void AP_GPS::update_instance(uint8_t instance) // delta will only be correct after parsing two messages timing[instance].delta_time_ms = tnow - timing[instance].last_message_time_ms; timing[instance].last_message_time_ms = tnow; - if (state[instance].status >= GPS_OK_FIX_2D) { + // if GPS disabled for flight testing then don't update fix timing value + if (state[instance].status >= GPS_OK_FIX_2D && !_force_disable_gps) { timing[instance].last_fix_time_ms = tnow; }