From d012cf8d471f7ac1c906ff074f79abdba086ae51 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 23 May 2020 10:24:32 +1000 Subject: [PATCH] AP_Camera: use new UARTDriver discard_input method --- libraries/AP_Camera/AP_RunCam.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libraries/AP_Camera/AP_RunCam.cpp b/libraries/AP_Camera/AP_RunCam.cpp index be07f5d6b3..4b3b9645a8 100644 --- a/libraries/AP_Camera/AP_RunCam.cpp +++ b/libraries/AP_Camera/AP_RunCam.cpp @@ -748,10 +748,7 @@ void AP_RunCam::drain() return; } - uint32_t avail = uart->available(); - while (avail-- > 0) { - uart->read(); - } + uart->discard_input(); } // get the device info (firmware version, protocol version and features)