From 8bd05941a13b7b1af30123fb78ca6e82093cd8c8 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 17 Mar 2024 21:21:32 +1100 Subject: [PATCH] AP_GPS: stop passing serial manager to GPS init it can get this via the singleton --- libraries/AP_GPS/AP_GPS.cpp | 3 ++- libraries/AP_GPS/AP_GPS.h | 2 +- libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index 25058e3a10..8ab52caa71 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -464,7 +464,7 @@ bool AP_GPS::needs_uart(GPS_Type type) const } /// Startup initialisation. -void AP_GPS::init(const AP_SerialManager& serial_manager) +void AP_GPS::init() { // Set new primary param based on old auto_switch use second option if ((_auto_switch.get() == 3) && !_primary.configured()) { @@ -473,6 +473,7 @@ void AP_GPS::init(const AP_SerialManager& serial_manager) } // search for serial ports with gps protocol + const auto &serial_manager = AP::serialmanager(); uint8_t uart_idx = 0; for (uint8_t i=0; i