Skip to content

Commit

Permalink
Merge pull request #9646 from sensei-hacker/7.1-M10_GPS_Glonass_and_B…
Browse files Browse the repository at this point in the history
…eidou_concurrent

gps_ublox.c: For M10 to use Glonass & Beideo concurrentlky, use B1C
  • Loading branch information
sensei-hacker authored Feb 14, 2024
2 parents 4932542 + af17e12 commit 4695d6a
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/main/io/gps_ublox.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,10 @@ static void configureGNSS10(void)
{UBLOX_CFG_SIGNAL_GAL_E1_ENA, gpsState.gpsConfig->ubloxUseGalileo},

// Beidou
// M10 can't use BDS_B1I and Glonass together. Instead, use BDS_B1C
{UBLOX_CFG_SIGNAL_BDS_ENA, gpsState.gpsConfig->ubloxUseBeidou},
{UBLOX_CFG_SIGNAL_BDS_B1_ENA, gpsState.gpsConfig->ubloxUseBeidou},
{UBLOX_CFG_SIGNAL_BDS_B1C_ENA, 0},
{UBLOX_CFG_SIGNAL_BDS_B1_ENA, gpsState.gpsConfig->ubloxUseBeidou && ! gpsState.gpsConfig->ubloxUseGlonass},
{UBLOX_CFG_SIGNAL_BDS_B1C_ENA, gpsState.gpsConfig->ubloxUseBeidou && gpsState.gpsConfig->ubloxUseGlonass},

// Should be enabled with GPS
{UBLOX_CFG_QZSS_ENA, 1},
Expand Down Expand Up @@ -954,12 +955,18 @@ STATIC_PROTOTHREAD(gpsConfigure)

// Configure GNSS for M8N and later
if (gpsState.hwVersion >= UBX_HW_VERSION_UBLOX8) {
gpsSetProtocolTimeout(GPS_SHORT_TIMEOUT);
if(gpsState.hwVersion >= UBX_HW_VERSION_UBLOX10 || (gpsState.swVersionMajor>=23 && gpsState.swVersionMinor >= 1)) {
gpsSetProtocolTimeout(GPS_SHORT_TIMEOUT);
bool use_VALSET = 0;
if ( (gpsState.swVersionMajor > 23) || (gpsState.swVersionMajor == 23 && gpsState.swVersionMinor > 1) ) {
use_VALSET = 1;
}

if ( use_VALSET && (gpsState.hwVersion >= UBX_HW_VERSION_UBLOX10) ) {
configureGNSS10();
} else {
} else {
configureGNSS();
}
}

ptWaitTimeout((_ack_state == UBX_ACK_GOT_ACK || _ack_state == UBX_ACK_GOT_NAK), GPS_CFG_CMD_TIMEOUT_MS);

if(_ack_state == UBX_ACK_GOT_NAK) {
Expand Down

0 comments on commit 4695d6a

Please sign in to comment.