From 37c6bec902877f511ceaa57d306f9aca97419529 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 8 Jan 2017 12:37:32 +1100 Subject: [PATCH] HAL_QURT: fixed a bug in new_input() same as for HAL_Linux --- libraries/AP_HAL_QURT/RCInput.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_QURT/RCInput.cpp b/libraries/AP_HAL_QURT/RCInput.cpp index cd10521499..9ebcb64293 100644 --- a/libraries/AP_HAL_QURT/RCInput.cpp +++ b/libraries/AP_HAL_QURT/RCInput.cpp @@ -64,7 +64,11 @@ void RCInput::read_callback(char *buf, size_t size) bool RCInput::new_input() { - return new_rc_input; + bool ret = new_rc_input; + if (ret) { + new_rc_input = false; + } + return ret; } uint8_t RCInput::num_channels() @@ -74,7 +78,6 @@ uint8_t RCInput::num_channels() uint16_t RCInput::read(uint8_t ch) { - new_rc_input = false; if (_override[ch]) { return _override[ch]; }