diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index fa996160f9..75266369b7 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -1183,21 +1183,28 @@ static void update_optical_flow(void) // called at 50hz static void update_GPS(void) { - static uint32_t last_gps_reading; // time of last gps message + static uint32_t last_gps_reading[GPS_MAX_INSTANCES]; // time of last gps message static uint8_t ground_start_count = 10; // counter used to grab at least 10 reads before commiting the Home location bool report_gps_glitch; + bool gps_updated = false; gps.update(); // logging and glitch protection run after every gps message - if (gps.last_message_time_ms() != last_gps_reading) { - last_gps_reading = gps.last_message_time_ms(); + for (uint8_t i=0; i