GCS_MAVLink: convert to using hal.serial() instead of hal.uartX

This commit is contained in:
Andrew Tridgell 2020-12-11 11:18:38 +11:00
parent 23e629715e
commit 6df118e7b4
2 changed files with 3 additions and 3 deletions

View File

@ -110,7 +110,7 @@ void GCS::send_named_float(const char *name, float value) const
/* /*
install an alternative protocol handler. This allows another install an alternative protocol handler. This allows another
protocol to take over the link if MAVLink goes idle. It is used to 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) bool GCS::install_alternative_protocol(mavlink_channel_t c, GCS_MAVLINK::protocol_handler_fn_t handler)
{ {

View File

@ -62,11 +62,11 @@ void GCS_MAVLINK::handle_serial_control(const mavlink_message_t &msg)
break; break;
} }
case SERIAL_CONTROL_DEV_GPS1: case SERIAL_CONTROL_DEV_GPS1:
stream = port = hal.uartB; stream = port = hal.serial(3);
AP::gps().lock_port(0, exclusive); AP::gps().lock_port(0, exclusive);
break; break;
case SERIAL_CONTROL_DEV_GPS2: case SERIAL_CONTROL_DEV_GPS2:
stream = port = hal.uartE; stream = port = hal.serial(4);
AP::gps().lock_port(1, exclusive); AP::gps().lock_port(1, exclusive);
break; break;
case SERIAL_CONTROL_DEV_SHELL: case SERIAL_CONTROL_DEV_SHELL: