From 126e6ac2073ffb96c3867e7cbdd4e51e8408d0ec Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 1 Dec 2012 16:30:21 +0100 Subject: Enabled manual override switch, work in progress. Added initial demix testing code to support delta mixing on the remote for convenient manual override --- apps/px4io/mixer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/px4io/mixer.c') diff --git a/apps/px4io/mixer.c b/apps/px4io/mixer.c index 483e9fe4d..d9626c1e3 100644 --- a/apps/px4io/mixer.c +++ b/apps/px4io/mixer.c @@ -97,7 +97,7 @@ mixer_tick(void) /* * Decide which set of inputs we're using. */ - if (system_state.mixer_use_fmu) { + if (system_state.mixer_use_fmu && system_state.mixer_fmu_available) { /* we have recent control data from the FMU */ control_count = PX4IO_OUTPUT_CHANNELS; control_values = &system_state.fmu_channel_data[0]; @@ -141,9 +141,10 @@ mixer_tick(void) /* * Decide whether the servos should be armed right now. + * A sufficient reason is armed state and either FMU or RC control inputs */ - should_arm = system_state.armed && system_state.arm_ok && (control_count > 0) && system_state.mixer_use_fmu; + should_arm = system_state.armed && system_state.arm_ok && (control_count > 0); if (should_arm && !mixer_servos_armed) { /* need to arm, but not armed */ up_pwm_servo_arm(true); -- cgit v1.2.3