From c8de2ec9c750786206ebc4f82e7f602b5e86f723 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 29 Aug 2019 08:38:58 +1000 Subject: [PATCH] AP_RCProtocol: added update() method for use by SITL --- libraries/AP_RCProtocol/AP_RCProtocol.cpp | 5 +++++ libraries/AP_RCProtocol/AP_RCProtocol.h | 1 + 2 files changed, 6 insertions(+) diff --git a/libraries/AP_RCProtocol/AP_RCProtocol.cpp b/libraries/AP_RCProtocol/AP_RCProtocol.cpp index 39573de8f0..2618a79587 100644 --- a/libraries/AP_RCProtocol/AP_RCProtocol.cpp +++ b/libraries/AP_RCProtocol/AP_RCProtocol.cpp @@ -202,6 +202,11 @@ void AP_RCProtocol::check_added_uart(void) } } +void AP_RCProtocol::update() +{ + check_added_uart(); +} + bool AP_RCProtocol::new_input() { bool ret = _new_input; diff --git a/libraries/AP_RCProtocol/AP_RCProtocol.h b/libraries/AP_RCProtocol/AP_RCProtocol.h index 08934fb442..a1e68513ab 100644 --- a/libraries/AP_RCProtocol/AP_RCProtocol.h +++ b/libraries/AP_RCProtocol/AP_RCProtocol.h @@ -47,6 +47,7 @@ public: void process_pulse(uint32_t width_s0, uint32_t width_s1); void process_pulse_list(const uint32_t *widths, uint16_t n, bool need_swap); void process_byte(uint8_t byte, uint32_t baudrate); + void update(void); void disable_for_pulses(enum rcprotocol_t protocol) { _disabled_for_pulses |= (1U<<(uint8_t)protocol);