diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-02-13 08:22:05 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-02-13 08:22:05 +0100 |
commit | 6a1f91e6254e14c52b77406b12b76e2a233aedf8 (patch) | |
tree | d43aa8deab5f287aa454447332f2f067efa1c93d /src/modules | |
parent | dd432e66032c3cb1cb6f65536c28af1dd9f97317 (diff) | |
download | px4-firmware-6a1f91e6254e14c52b77406b12b76e2a233aedf8.tar.gz px4-firmware-6a1f91e6254e14c52b77406b12b76e2a233aedf8.tar.bz2 px4-firmware-6a1f91e6254e14c52b77406b12b76e2a233aedf8.zip |
Make SBUS output exclusive
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/px4iofirmware/mixer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/px4iofirmware/mixer.cpp b/src/modules/px4iofirmware/mixer.cpp index 3eaecc38b..b175c3bc8 100644 --- a/src/modules/px4iofirmware/mixer.cpp +++ b/src/modules/px4iofirmware/mixer.cpp @@ -255,11 +255,12 @@ mixer_tick(void) up_pwm_servo_set(i, r_page_servos[i]); /* set S.BUS1 or S.BUS2 outputs */ - if (r_setup_features & PX4IO_P_SETUP_FEATURES_SBUS1_OUT) - sbus1_output(r_page_servos, PX4IO_SERVO_COUNT); - if (r_setup_features & PX4IO_P_SETUP_FEATURES_SBUS2_OUT) + if (r_setup_features & PX4IO_P_SETUP_FEATURES_SBUS2_OUT) { sbus2_output(r_page_servos, PX4IO_SERVO_COUNT); + } else if (r_setup_features & PX4IO_P_SETUP_FEATURES_SBUS1_OUT) { + sbus1_output(r_page_servos, PX4IO_SERVO_COUNT); + } } else if (mixer_servos_armed && should_always_enable_pwm) { /* set the disarmed servo outputs. */ |