diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index cbd93776ff..6b2c24e63c 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -624,6 +624,7 @@ void AP_GPS::update_instance(uint8_t instance) delete drivers[instance]; drivers[instance] = nullptr; memset(&state[instance], 0, sizeof(state[instance])); + state[instance].instance = instance; state[instance].status = NO_GPS; state[instance].hdop = GPS_UNKNOWN_DOP; state[instance].vdop = GPS_UNKNOWN_DOP;