From 3f5184dee2777df118d8518093215eb982063561 Mon Sep 17 00:00:00 2001 From: Thomas Frans Date: Wed, 28 Feb 2024 11:57:52 +0100 Subject: [PATCH 1/2] Update src/drivers/gps/devices --- .gitmodules | 4 ++-- src/drivers/gps/devices | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index e91cf2b63a14..e3276e476f46 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,8 +16,8 @@ branch = main [submodule "src/drivers/gps/devices"] path = src/drivers/gps/devices - url = https://github.com/PX4/PX4-GPSDrivers.git - branch = main + url = https://github.com/flyingthingsintothings/PX4-GPSDrivers + branch = gps-autoconfig-parameter [submodule "platforms/nuttx/NuttX/nuttx"] path = platforms/nuttx/NuttX/nuttx url = https://github.com/PX4/NuttX.git diff --git a/src/drivers/gps/devices b/src/drivers/gps/devices index 17c0e2bfad1e..a56a11ae091b 160000 --- a/src/drivers/gps/devices +++ b/src/drivers/gps/devices @@ -1 +1 @@ -Subproject commit 17c0e2bfad1e544c4b11329c742630a765c7537f +Subproject commit a56a11ae091b9b74abba127a83286f7726768b28 From 94aa1a6e82d31f4b16901545b47b2f595ef16e3c Mon Sep 17 00:00:00 2001 From: Thomas Frans Date: Wed, 28 Feb 2024 11:58:11 +0100 Subject: [PATCH 2/2] gps: add `GPS_AUTO_CONFIG` parameter to disable automatic receiver setup This adds a new parameter that can be used when testing receiver configurations or for advanced users who want to configure the GPS receiver themselves. It only supports Septentrio receivers for now. --- src/drivers/gps/gps.cpp | 5 +++++ src/drivers/gps/params.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/drivers/gps/gps.cpp b/src/drivers/gps/gps.cpp index 4ed29a8c6e35..d153e54c04e0 100644 --- a/src/drivers/gps/gps.cpp +++ b/src/drivers/gps/gps.cpp @@ -828,6 +828,10 @@ GPS::run() param_get(handle, &gnssSystemsParam); } + int32_t configure_device = 0; + handle = param_find("GPS_AUTO_CONFIG"); + param_get(handle, &configure_device); + initializeCommunicationDump(); uint64_t last_rate_measurement = hrt_absolute_time(); @@ -936,6 +940,7 @@ GPS::run() } gpsConfig.interface_protocols = static_cast(gps_ubx_cfg_intf); + gpsConfig.configure_device = configure_device; if (_helper && _helper->configure(_baudrate, gpsConfig) == 0) { diff --git a/src/drivers/gps/params.c b/src/drivers/gps/params.c index 49b4da7065bf..3cb822d6b0d2 100644 --- a/src/drivers/gps/params.c +++ b/src/drivers/gps/params.c @@ -290,3 +290,16 @@ PARAM_DEFINE_INT32(GPS_1_GNSS, 0); * @group GPS */ PARAM_DEFINE_INT32(GPS_2_GNSS, 0); + +/** + * Enable automatic receiver configuration + * + * Enable automatic configuration of the GPS receivers. + * + * Currently this functionality is just implemented for Septentrio receivers. + * + * @boolean + * @reboot_required true + * @group GPS + */ +PARAM_DEFINE_INT32(GPS_AUTO_CONFIG, 1);