From e02047861ad1c572833670963c2505d3c46bb65e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Dec 2020 11:18:37 +1100 Subject: [PATCH] AP_GPS: convert to using hal.serial() instead of hal.uartX --- .../GPS_UBLOX_passthrough/GPS_UBLOX_passthrough.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_GPS/examples/GPS_UBLOX_passthrough/GPS_UBLOX_passthrough.cpp b/libraries/AP_GPS/examples/GPS_UBLOX_passthrough/GPS_UBLOX_passthrough.cpp index 22f91f9274..ac2bb298a3 100644 --- a/libraries/AP_GPS/examples/GPS_UBLOX_passthrough/GPS_UBLOX_passthrough.cpp +++ b/libraries/AP_GPS/examples/GPS_UBLOX_passthrough/GPS_UBLOX_passthrough.cpp @@ -18,18 +18,18 @@ void setup() hal.console->begin(38400); // initialise gps uart to 38400 baud - hal.uartB->begin(38400); + hal.serial(3)->begin(38400); } void loop() { // send characters received from the console to the GPS while (hal.console->available()) { - hal.uartB->write(hal.console->read()); + hal.serial(3)->write(hal.console->read()); } // send GPS characters to the console - while (hal.uartB->available()) { - hal.console->write(hal.uartB->read()); + while (hal.serial(3)->available()) { + hal.console->write(hal.serial(3)->read()); } }