diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-12-05 19:55:33 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-12-05 19:55:33 +0100 |
commit | 1ebb3b4ada6bdf2109f3e6bb45800f0459b35ccc (patch) | |
tree | d0ac45b615ef77168dd802799aa0c4262ae15e07 /apps/px4io/comms.c | |
parent | 126e6ac2073ffb96c3867e7cbdd4e51e8408d0ec (diff) | |
parent | fd771f67f2a2392d5ba2b7dd74100338859af6d7 (diff) | |
download | px4-firmware-1ebb3b4ada6bdf2109f3e6bb45800f0459b35ccc.tar.gz px4-firmware-1ebb3b4ada6bdf2109f3e6bb45800f0459b35ccc.tar.bz2 px4-firmware-1ebb3b4ada6bdf2109f3e6bb45800f0459b35ccc.zip |
Merged DSM fixes
Diffstat (limited to 'apps/px4io/comms.c')
-rw-r--r-- | apps/px4io/comms.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/apps/px4io/comms.c b/apps/px4io/comms.c index f4eddbdd3..5033aeb98 100644 --- a/apps/px4io/comms.c +++ b/apps/px4io/comms.c @@ -100,8 +100,8 @@ comms_main(void) debug("FMU: ready"); for (;;) { - /* wait for serial data, but no more than 100ms */ - poll(&fds, 1, 100); + /* wait for serial data, but no more than 10ms */ + poll(&fds, 1, 10); /* * Pull bytes from FMU and feed them to the HX engine. @@ -130,15 +130,9 @@ comms_main(void) last_report_time = now; /* populate the report */ - for (int i = 0; i < system_state.rc_channels; i++) + for (unsigned i = 0; i < system_state.rc_channels; i++) report.rc_channel[i] = system_state.rc_channel_data[i]; - - if (system_state.sbus_input_ok || system_state.dsm_input_ok || system_state.ppm_input_ok) { - report.channel_count = system_state.rc_channels; - } else { - report.channel_count = 0; - } - + report.channel_count = system_state.rc_channels; report.armed = system_state.armed; /* and send it */ |