From cb38651df54198fada23a4f014f8bb369e009a51 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Thu, 6 Dec 2012 12:45:44 -0800 Subject: [PATCH] AP_HAL: RCInput has overrides --- libraries/AP_HAL/RCInput.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libraries/AP_HAL/RCInput.h b/libraries/AP_HAL/RCInput.h index f9a6195092..60884453ce 100644 --- a/libraries/AP_HAL/RCInput.h +++ b/libraries/AP_HAL/RCInput.h @@ -30,6 +30,23 @@ public: /* Read an array of channels, return the valid count */ virtual uint8_t read(uint16_t* periods, uint8_t len) = 0; + + /** + * Overrides: these are really grody and don't belong here but we need + * them at the moment to make the port work. + * case v of: + * v == -1 -> no change to this channel + * v == 0 -> do not override this channel + * v > 0 -> set v as override. + */ + + /* set_overrides: array starts at ch 0, for len channels */ + virtual bool set_overrides(int16_t *overrides, uint8_t len) = 0; + /* set_override: set just a specific channel */ + virtual bool set_override(uint8_t channel, int16_t override) = 0; + /* clear_overrides: equivelant to setting all overrides to 0 */ + virtual void clear_overrides() = 0; + }; #endif // __AP_HAL_RC_INPUT_H__