diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-09-10 13:22:56 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-09-10 13:22:56 +0200 |
commit | c3b6cea77a1fe59e58b0019d1f8e5b95daf55494 (patch) | |
tree | fcee7ae14f10d19a7e0f800e13a8a932116eee14 /src/modules/px4iofirmware/controls.c | |
parent | 465f161427767da4384bf9291f8b1ad782c04c30 (diff) | |
download | px4-firmware-c3b6cea77a1fe59e58b0019d1f8e5b95daf55494.tar.gz px4-firmware-c3b6cea77a1fe59e58b0019d1f8e5b95daf55494.tar.bz2 px4-firmware-c3b6cea77a1fe59e58b0019d1f8e5b95daf55494.zip |
Hotfix for S.Bus systems with more than 8 channels
Diffstat (limited to 'src/modules/px4iofirmware/controls.c')
-rw-r--r-- | src/modules/px4iofirmware/controls.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/px4iofirmware/controls.c b/src/modules/px4iofirmware/controls.c index b17276a31..617b536f4 100644 --- a/src/modules/px4iofirmware/controls.c +++ b/src/modules/px4iofirmware/controls.c @@ -108,9 +108,11 @@ controls_tick() { perf_end(c_gather_dsm); perf_begin(c_gather_sbus); - bool sbus_updated = sbus_input(r_raw_rc_values, &r_raw_rc_count); - if (sbus_updated) + bool sbus_updated = sbus_input(r_raw_rc_values, &r_raw_rc_count, PX4IO_CONTROL_CHANNELS /* XXX this should be INPUT channels, once untangled */); + if (sbus_updated) { r_status_flags |= PX4IO_P_STATUS_FLAGS_RC_SBUS; + r_raw_rc_count = 8; + } perf_end(c_gather_sbus); /* |