diff --git a/libraries/AP_Mount/AP_Mount_Alexmos.cpp b/libraries/AP_Mount/AP_Mount_Alexmos.cpp index f3b970190d..87516f5303 100644 --- a/libraries/AP_Mount/AP_Mount_Alexmos.cpp +++ b/libraries/AP_Mount/AP_Mount_Alexmos.cpp @@ -214,7 +214,10 @@ void AP_Mount_Alexmos::parse_body() void AP_Mount_Alexmos::read_incoming() { uint8_t data; - while (_port->available()) { + int16_t numc; + + numc = _port->available(); + for (int16_t i = 0; i < numc; i++) { // Process bytes received data = _port->read(); switch (_step) { case 0: