Skip to content
Snippets Groups Projects
Commit 82e7e44c authored by Andrew Tridgell's avatar Andrew Tridgell Committed by Francisco Ferreira
Browse files

AP_GPS: fixed UAVCAN as 2nd GPS

This fixes the issue here:

  https://discuss.ardupilot.org/t/ac3-6-dev-dual-gps-issues/19172

thanks to Francisco for spotting the issue

this is tested with UAVCAN as 2nd GPS, ublox as primary
parent d2c57860
No related branches found
No related tags found
No related merge requests found
...@@ -399,6 +399,11 @@ void AP_GPS::detect_instance(uint8_t instance) ...@@ -399,6 +399,11 @@ void AP_GPS::detect_instance(uint8_t instance)
struct detect_state *dstate = &detect_state[instance]; struct detect_state *dstate = &detect_state[instance];
uint32_t now = AP_HAL::millis(); uint32_t now = AP_HAL::millis();
state[instance].instance = instance;
state[instance].status = NO_GPS;
state[instance].hdop = GPS_UNKNOWN_DOP;
state[instance].vdop = GPS_UNKNOWN_DOP;
switch (_type[instance]) { switch (_type[instance]) {
#if CONFIG_HAL_BOARD == HAL_BOARD_QURT #if CONFIG_HAL_BOARD == HAL_BOARD_QURT
case GPS_TYPE_QURT: case GPS_TYPE_QURT:
...@@ -456,11 +461,6 @@ void AP_GPS::detect_instance(uint8_t instance) ...@@ -456,11 +461,6 @@ void AP_GPS::detect_instance(uint8_t instance)
return; return;
} }
state[instance].instance = instance;
state[instance].status = NO_GPS;
state[instance].hdop = GPS_UNKNOWN_DOP;
state[instance].vdop = GPS_UNKNOWN_DOP;
// all remaining drivers automatically cycle through baud rates to detect // all remaining drivers automatically cycle through baud rates to detect
// the correct baud rate, and should have the selected baud broadcast // the correct baud rate, and should have the selected baud broadcast
dstate->auto_detected_baud = true; dstate->auto_detected_baud = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment