mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_GPS: Preserve the instance number, otherwise it will get set to zero
Signed-off-by: Dr.-Ing. Amilcar Do Carmo Lucas <amilcar.lucas@iav.de>
This commit is contained in:
parent
8b9fb19061
commit
09baac8f25
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user