diff --git a/libraries/AP_IOMCU/AP_IOMCU.cpp b/libraries/AP_IOMCU/AP_IOMCU.cpp index cd519d982f..d89d7bc2b2 100644 --- a/libraries/AP_IOMCU/AP_IOMCU.cpp +++ b/libraries/AP_IOMCU/AP_IOMCU.cpp @@ -389,10 +389,7 @@ void AP_IOMCU::read_servo() */ void AP_IOMCU::discard_input(void) { - uint32_t n = uart.available(); - while (n--) { - uart.read(); - } + uart.discard_input(); } /*