From 6df118e7b4b6a888abd84634643a78654cc94cb8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Dec 2020 11:18:38 +1100 Subject: [PATCH] GCS_MAVLink: convert to using hal.serial() instead of hal.uartX --- libraries/GCS_MAVLink/GCS.cpp | 2 +- libraries/GCS_MAVLink/GCS_serial_control.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS.cpp b/libraries/GCS_MAVLink/GCS.cpp index 2b122bc1ce..5f6b5f72ab 100644 --- a/libraries/GCS_MAVLink/GCS.cpp +++ b/libraries/GCS_MAVLink/GCS.cpp @@ -110,7 +110,7 @@ void GCS::send_named_float(const char *name, float value) const /* install an alternative protocol handler. This allows another protocol to take over the link if MAVLink goes idle. It is used to - allow for the AP_BLHeli pass-thru protocols to run on hal.uartA + allow for the AP_BLHeli pass-thru protocols to run on hal.serial(0) */ bool GCS::install_alternative_protocol(mavlink_channel_t c, GCS_MAVLINK::protocol_handler_fn_t handler) { diff --git a/libraries/GCS_MAVLink/GCS_serial_control.cpp b/libraries/GCS_MAVLink/GCS_serial_control.cpp index 8bbeceffd6..805dfa32f5 100644 --- a/libraries/GCS_MAVLink/GCS_serial_control.cpp +++ b/libraries/GCS_MAVLink/GCS_serial_control.cpp @@ -62,11 +62,11 @@ void GCS_MAVLINK::handle_serial_control(const mavlink_message_t &msg) break; } case SERIAL_CONTROL_DEV_GPS1: - stream = port = hal.uartB; + stream = port = hal.serial(3); AP::gps().lock_port(0, exclusive); break; case SERIAL_CONTROL_DEV_GPS2: - stream = port = hal.uartE; + stream = port = hal.serial(4); AP::gps().lock_port(1, exclusive); break; case SERIAL_CONTROL_DEV_SHELL: