aboutsummaryrefslogtreecommitdiff
path: root/apps/px4io/mixer.c
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-12-01 16:30:21 +0100
committerLorenz Meier <lm@inf.ethz.ch>2012-12-01 16:30:21 +0100
commit126e6ac2073ffb96c3867e7cbdd4e51e8408d0ec (patch)
tree277f05a93bea57ada888302829f716dc46dd92ef /apps/px4io/mixer.c
parent2bfb6727912e804325e5a512c9c09d36e8fe06d3 (diff)
downloadpx4-firmware-126e6ac2073ffb96c3867e7cbdd4e51e8408d0ec.tar.gz
px4-firmware-126e6ac2073ffb96c3867e7cbdd4e51e8408d0ec.tar.bz2
px4-firmware-126e6ac2073ffb96c3867e7cbdd4e51e8408d0ec.zip
Enabled manual override switch, work in progress. Added initial demix testing code to support delta mixing on the remote for convenient manual override
Diffstat (limited to 'apps/px4io/mixer.c')
-rw-r--r--apps/px4io/mixer.c5
1 files changed, 3 insertions, 2 deletions
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);