aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorLorenz Meier <lm@qgroundcontrol.org>2014-11-17 00:02:41 +0100
committerLorenz Meier <lm@qgroundcontrol.org>2014-11-17 00:02:41 +0100
commit7480fc92d03d37e33b726a4939ac4d4e9b965edd (patch)
treecbe285220485f9ef5acf4e545b35771450ad6488 /src/modules
parentd9e563609e354622909571acfe0fe6f5ade88376 (diff)
parent852fa611730be2433156b010c6162606ec857ef3 (diff)
downloadpx4-firmware-7480fc92d03d37e33b726a4939ac4d4e9b965edd.tar.gz
px4-firmware-7480fc92d03d37e33b726a4939ac4d4e9b965edd.tar.bz2
px4-firmware-7480fc92d03d37e33b726a4939ac4d4e9b965edd.zip
Merge pull request #1460 from DonLakeFlyer/rctype
Correct setting of DSM and ST24 flags
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/px4iofirmware/controls.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/px4iofirmware/controls.c b/src/modules/px4iofirmware/controls.c
index 3fd73fc60..75d80ba5d 100644
--- a/src/modules/px4iofirmware/controls.c
+++ b/src/modules/px4iofirmware/controls.c
@@ -71,7 +71,6 @@ bool dsm_port_input(uint16_t *rssi, bool *dsm_updated, bool *st24_updated)
uint8_t *bytes;
*dsm_updated = dsm_input(r_raw_rc_values, &temp_count, &n_bytes, &bytes);
if (*dsm_updated) {
- r_raw_rc_flags |= PX4IO_P_STATUS_FLAGS_RC_DSM;
r_raw_rc_count = temp_count & 0x7fff;
if (temp_count & 0x8000)
r_raw_rc_flags |= PX4IO_P_RAW_RC_FLAGS_RC_DSM11;
@@ -172,6 +171,12 @@ controls_tick() {
perf_begin(c_gather_dsm);
bool dsm_updated, st24_updated;
(void)dsm_port_input(&rssi, &dsm_updated, &st24_updated);
+ if (dsm_updated) {
+ r_status_flags |= PX4IO_P_STATUS_FLAGS_RC_DSM;
+ }
+ if (st24_updated) {
+ r_status_flags |= PX4IO_P_STATUS_FLAGS_RC_ST24;
+ }
perf_end(c_gather_dsm);
perf_begin(c_gather_sbus);