From e9633553fbb6e751b5d5a540885cd17558e3e511 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 15 Oct 2016 16:26:29 +1100 Subject: [PATCH] HAL_Linux: update for changed SRXL API --- libraries/AP_HAL_Linux/RCInput.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_Linux/RCInput.cpp b/libraries/AP_HAL_Linux/RCInput.cpp index 52b1b2e5e5..842dc0e312 100644 --- a/libraries/AP_HAL_Linux/RCInput.cpp +++ b/libraries/AP_HAL_Linux/RCInput.cpp @@ -483,9 +483,11 @@ bool RCInput::add_srxl_input(const uint8_t *bytes, size_t nbytes) uint8_t channel_count; uint64_t now = AP_HAL::micros64(); bool ret = false; + bool failsafe_state; while (nbytes > 0) { - if (srxl_decode(now, *bytes++, &channel_count, values, LINUX_RC_INPUT_NUM_CHANNELS) == 0) { + if (srxl_decode(now, *bytes++, &channel_count, values, LINUX_RC_INPUT_NUM_CHANNELS, &failsafe_state) == 0 && + failsafe_state == false) { if (channel_count > LINUX_RC_INPUT_NUM_CHANNELS) { continue; }