diff options
author | px4dev <px4@purgatory.org> | 2012-12-03 23:20:28 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-12-03 23:20:28 -0800 |
commit | 1485a4ec1aa8328cc50d99a1195b20df2b11045e (patch) | |
tree | f67ead58c92cc4febae6faa65ef4523581b511f1 /apps/px4io/comms.c | |
parent | 6e328b4d7ab31faef5796956cffb985a9859549d (diff) | |
download | px4-firmware-1485a4ec1aa8328cc50d99a1195b20df2b11045e.tar.gz px4-firmware-1485a4ec1aa8328cc50d99a1195b20df2b11045e.tar.bz2 px4-firmware-1485a4ec1aa8328cc50d99a1195b20df2b11045e.zip |
Fix breakage to the DSM parser introduced with the input prioritisation logic. Back out to a "any input wins" strategy; connecting multiple receivers to I/O at the same time is currently not supported (read: strange things will happen).
Diffstat (limited to 'apps/px4io/comms.c')
-rw-r--r-- | apps/px4io/comms.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/apps/px4io/comms.c b/apps/px4io/comms.c index 40ea38cf7..480e3f5cc 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. @@ -132,13 +132,7 @@ comms_main(void) /* populate the report */ for (int 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 */ |