diff --git a/flight/modules/GPS/GPS.c b/flight/modules/GPS/GPS.c index 8dbcd7b57..99708d05d 100644 --- a/flight/modules/GPS/GPS.c +++ b/flight/modules/GPS/GPS.c @@ -553,10 +553,14 @@ void updateGpsSettings(__attribute__((unused)) UAVObjEvent *ev) newconfig.enableGPS = false; newconfig.enableGLONASS = true; break; - default: + case GPSSETTINGS_UBXGNSSMODE_GPS: newconfig.enableGPS = true; newconfig.enableGLONASS = false; break; + default: + newconfig.enableGPS = false; + newconfig.enableGLONASS = false; + break; } ubx_autoconfig_set(newconfig); diff --git a/flight/modules/GPS/ubx_autoconfig.c b/flight/modules/GPS/ubx_autoconfig.c index 67cb887f0..c24c47f8f 100644 --- a/flight/modules/GPS/ubx_autoconfig.c +++ b/flight/modules/GPS/ubx_autoconfig.c @@ -296,8 +296,13 @@ static void configure(uint16_t *bytes_to_send) config_nav(bytes_to_send); break; case LAST_CONFIG_SENT_START + 2: - config_gnss(bytes_to_send); - break; + if (status->currentSettings.enableGLONASS || status->currentSettings.enableGPS) { + config_gnss(bytes_to_send); + break; + } else { + // Skip and fall through to next step + status->lastConfigSent++; + } case LAST_CONFIG_SENT_START + 3: config_sbas(bytes_to_send); if (!status->currentSettings.storeSettings) { diff --git a/shared/uavobjectdefinition/gpssettings.xml b/shared/uavobjectdefinition/gpssettings.xml index 5caf23c15..b16054387 100644 --- a/shared/uavobjectdefinition/gpssettings.xml +++ b/shared/uavobjectdefinition/gpssettings.xml @@ -17,7 +17,7 @@ <field name="UbxSBASChannelsUsed" units="" type="uint8" elements="1" defaultvalue="3"/> <field name="UbxSBASSats" units="" type="enum" elements="1" options="AutoScan,WAAS,EGNOS,MSAS,GAGAN,SDCM" defaultvalue="Auto-Scan" /> <!-- Ubx GNSS configuration, only applies to Ublox generation 7+ and GPS+GLONASS only to generation 8 --> - <field name="UbxGNSSMode" units="" type="enum" elements="1" options="GPS,GLONASS,GPS+GLONASS" defaultvalue="GPS" /> + <field name="UbxGNSSMode" units="" type="enum" elements="1" options="Default,GPS,GLONASS,GPS+GLONASS" defaultvalue="Default" /> <access gcs="readwrite" flight="readwrite"/> <telemetrygcs acked="true" updatemode="onchange" period="0"/> <telemetryflight acked="true" updatemode="onchange" period="0"/>