From 737c4ac36f43496385da1a10faf5cce255fd70f4 Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Thu, 26 Apr 2018 16:14:40 -0700 Subject: [PATCH] AP_HAL_Linux: Remove RC overrides --- libraries/AP_HAL_Linux/RCInput.cpp | 24 ------------------------ libraries/AP_HAL_Linux/RCInput.h | 6 ------ 2 files changed, 30 deletions(-) diff --git a/libraries/AP_HAL_Linux/RCInput.cpp b/libraries/AP_HAL_Linux/RCInput.cpp index e812e4e3c7..239b6a9094 100644 --- a/libraries/AP_HAL_Linux/RCInput.cpp +++ b/libraries/AP_HAL_Linux/RCInput.cpp @@ -50,9 +50,6 @@ uint8_t RCInput::num_channels() uint16_t RCInput::read(uint8_t ch) { - if (_override[ch]) { - return _override[ch]; - } if (ch >= _num_channels) { return 0; } @@ -68,27 +65,6 @@ uint8_t RCInput::read(uint16_t* periods, uint8_t len) return len; } -bool RCInput::set_override(uint8_t channel, int16_t override) -{ - if (override < 0) return false; /* -1: no change. */ - if (channel < LINUX_RC_INPUT_NUM_CHANNELS) { - _override[channel] = override; - if (override != 0) { - rc_input_count++; - return true; - } - } - return false; -} - -void RCInput::clear_overrides() -{ - for (uint8_t i = 0; i < LINUX_RC_INPUT_NUM_CHANNELS; i++) { - _override[i] = 0; - } -} - - /* process a PPM-sum pulse of the given width */ diff --git a/libraries/AP_HAL_Linux/RCInput.h b/libraries/AP_HAL_Linux/RCInput.h index 3ad74ca3ff..e2b9f11879 100644 --- a/libraries/AP_HAL_Linux/RCInput.h +++ b/libraries/AP_HAL_Linux/RCInput.h @@ -26,9 +26,6 @@ public: return _rssi; } - bool set_override(uint8_t channel, int16_t override); - void clear_overrides(); - // default empty _timer_tick, this is overridden by board // specific implementations virtual void _timer_tick() {} @@ -62,9 +59,6 @@ protected: void _process_sbus_pulse(uint16_t width_s0, uint16_t width_s1); void _process_dsm_pulse(uint16_t width_s0, uint16_t width_s1); - /* override state */ - uint16_t _override[LINUX_RC_INPUT_NUM_CHANNELS]; - // state of ppm decoder struct { int8_t _channel_counter;