1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP-1739 Add GNSS mode to GPS settings UAVO.

This commit is contained in:
Erik Gustavsson 2015-02-22 14:30:14 +01:00
parent 2029255538
commit 2c403d5323
2 changed files with 20 additions and 0 deletions

View File

@ -479,6 +479,7 @@ void updateGpsSettings(__attribute__((unused)) UAVObjEvent *ev)
uint8_t ubxSbasMode;
ubx_autoconfig_settings_t newconfig;
uint8_t ubxSbasSats;
uint8_t ubxGnssMode;
GPSSettingsUbxRateGet(&newconfig.navRate);
@ -541,6 +542,23 @@ void updateGpsSettings(__attribute__((unused)) UAVObjEvent *ev)
ubxSbasSats == GPSSETTINGS_UBXSBASSATS_GAGAN ? UBX_SBAS_SATS_GAGAN :
ubxSbasSats == GPSSETTINGS_UBXSBASSATS_SDCM ? UBX_SBAS_SATS_SDCM : UBX_SBAS_SATS_AUTOSCAN;
GPSSettingsUbxGNSSModeGet(&ubxGnssMode);
switch (ubxGnssMode) {
case GPSSETTINGS_UBXGNSSMODE_GPSGLONASS:
newconfig.enableGPS = true;
newconfig.enableGLONASS = true;
break;
case GPSSETTINGS_UBXGNSSMODE_GLONASS:
newconfig.enableGPS = false;
newconfig.enableGLONASS = true;
break;
default:
newconfig.enableGPS = true;
newconfig.enableGLONASS = false;
break;
}
ubx_autoconfig_set(newconfig);
}
#endif /* if defined(PIOS_INCLUDE_GPS_UBX_PARSER) && !defined(PIOS_GPS_MINIMAL) */

View File

@ -16,6 +16,8 @@
<field name="UbxSBASMode" units="" type="enum" elements="1" options="Disabled,Ranging,Correction,Integrity,Ranging+Correction,Ranging+Integrity,Ranging+Correction+Integrity,Correction+Integrity" defaultvalue="Ranging" />
<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" />
<access gcs="readwrite" flight="readwrite"/>
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
<telemetryflight acked="true" updatemode="onchange" period="0"/>