From 72327a6812502fc3a89d926fbdcb055cd2251575 Mon Sep 17 00:00:00 2001 From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:43:52 +0200 Subject: [PATCH 1/3] UBLOX and UBLOX7 have been merged into UBLOX Any difference between UBLOX and UBLOX7 is now handled based on GPS protocol version, and not INAV GPS Provider type. --- src/main/fc/settings.yaml | 2 +- src/main/io/gps.h | 1 - src/main/io/gps_ublox.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/fc/settings.yaml b/src/main/fc/settings.yaml index 6670148d0bd..b8ab782ee96 100644 --- a/src/main/fc/settings.yaml +++ b/src/main/fc/settings.yaml @@ -42,7 +42,7 @@ tables: values: ["VELNED", "TURNRATE","ADAPTIVE"] enum: imu_inertia_comp_method_e - name: gps_provider - values: ["UBLOX", "UBLOX7", "MSP", "FAKE"] + values: ["UBLOX", "MSP", "FAKE"] enum: gpsProvider_e - name: gps_sbas_mode values: ["AUTO", "EGNOS", "WAAS", "MSAS", "GAGAN", "SPAN", "NONE"] diff --git a/src/main/io/gps.h b/src/main/io/gps.h index 7b78fe5e799..c14db4a7630 100755 --- a/src/main/io/gps.h +++ b/src/main/io/gps.h @@ -34,7 +34,6 @@ typedef enum { GPS_UBLOX = 0, - GPS_UBLOX7PLUS, GPS_MSP, GPS_FAKE, GPS_PROVIDER_COUNT diff --git a/src/main/io/gps_ublox.c b/src/main/io/gps_ublox.c index 725ecfd862d..acc894996ba 100755 --- a/src/main/io/gps_ublox.c +++ b/src/main/io/gps_ublox.c @@ -1224,7 +1224,7 @@ STATIC_PROTOTHREAD(gpsProtocolStateThread) ptSemaphoreWait(semNewDataReady); gpsProcessNewSolutionData(false); - if ((gpsState.gpsConfig->autoConfig) && (gpsState.gpsConfig->provider == GPS_UBLOX || gpsState.gpsConfig->provider == GPS_UBLOX7PLUS)) { + if ((gpsState.gpsConfig->autoConfig) && (gpsState.gpsConfig->provider == GPS_UBLOX)) { if ((millis() - gpsState.lastCapaPoolMs) > GPS_CAPA_INTERVAL) { gpsState.lastCapaPoolMs = millis(); From e8fd649a6f9f639cdc0ebe64d8c044d68b484078 Mon Sep 17 00:00:00 2001 From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:59:27 +0200 Subject: [PATCH 2/3] Missed commit --- src/main/io/gps.c | 7 ------- src/main/io/gps_ublox.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/io/gps.c b/src/main/io/gps.c index 294b9414297..e7aecd3e0d6 100755 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -102,13 +102,6 @@ static gpsProviderDescriptor_t gpsProviders[GPS_PROVIDER_COUNT] = { { false, 0, NULL, NULL }, #endif - /* UBLOX7PLUS binary */ -#ifdef USE_GPS_PROTO_UBLOX - { false, MODE_RXTX, &gpsRestartUBLOX, &gpsHandleUBLOX }, -#else - { false, 0, NULL, NULL }, -#endif - /* MSP GPS */ #ifdef USE_GPS_PROTO_MSP { true, 0, &gpsRestartMSP, &gpsHandleMSP }, diff --git a/src/main/io/gps_ublox.c b/src/main/io/gps_ublox.c index acc894996ba..4e32628a017 100755 --- a/src/main/io/gps_ublox.c +++ b/src/main/io/gps_ublox.c @@ -1271,7 +1271,7 @@ void gpsHandleUBLOX(void) bool isGpsUblox(void) { - if(gpsState.gpsPort != NULL && (gpsState.gpsConfig->provider == GPS_UBLOX || gpsState.gpsConfig->provider == GPS_UBLOX7PLUS)) { + if(gpsState.gpsPort != NULL && (gpsState.gpsConfig->provider == GPS_UBLOX)) { return true; } From e6e903a076fbbc4f46e0ad84a35ad69b4c20e293 Mon Sep 17 00:00:00 2001 From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com> Date: Tue, 9 Jul 2024 18:12:25 +0200 Subject: [PATCH 3/3] No need to check provider. --- src/main/io/gps_ublox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/io/gps_ublox.c b/src/main/io/gps_ublox.c index 4e32628a017..89549768edb 100755 --- a/src/main/io/gps_ublox.c +++ b/src/main/io/gps_ublox.c @@ -1224,7 +1224,7 @@ STATIC_PROTOTHREAD(gpsProtocolStateThread) ptSemaphoreWait(semNewDataReady); gpsProcessNewSolutionData(false); - if ((gpsState.gpsConfig->autoConfig) && (gpsState.gpsConfig->provider == GPS_UBLOX)) { + if (gpsState.gpsConfig->autoConfig) { if ((millis() - gpsState.lastCapaPoolMs) > GPS_CAPA_INTERVAL) { gpsState.lastCapaPoolMs = millis();