From 3d16ca7144b222724233256943b86a73483d3dcb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 19 Sep 2017 16:38:14 +1000 Subject: [PATCH] Plane: fixed MANUAL_RCMASK ensure it only applies in MANUAL, and fixed input scaling in px4io --- ArduPlane/px4_mixer.cpp | 8 ++++++++ ArduPlane/servos.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ArduPlane/px4_mixer.cpp b/ArduPlane/px4_mixer.cpp index 439af12d75..c5a32843e4 100644 --- a/ArduPlane/px4_mixer.cpp +++ b/ArduPlane/px4_mixer.cpp @@ -269,6 +269,7 @@ bool Plane::setup_failsafe_mixing(void) enum AP_HAL::Util::safety_state old_state = hal.util->safety_switch_state(); struct pwm_output_values pwm_values = {.values = {0}, .channel_count = 8}; unsigned mixer_status = 0; + uint16_t manual_mask = uint16_t(g2.manual_rc_mask.get()); buf = (char *)malloc(buf_size); if (buf == nullptr) { @@ -365,6 +366,13 @@ bool Plane::setup_failsafe_mixing(void) config.rc_max = 1813; // round 1812.5 up to grant > 1750 config.rc_min = 1000; config.rc_trim = 1500; + } else if (manual_mask & (1U<