diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-05 11:15:22 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-05 11:15:22 +0200 |
commit | 73d04f7a37ba52ce1891e740db554557bd71940a (patch) | |
tree | 25c22b9a765c4d67147aa9f53abc72cc78e269bb | |
parent | 3e4841b6fe2d8d6d06b167be49cbe76ab7e04a46 (diff) | |
download | px4-firmware-73d04f7a37ba52ce1891e740db554557bd71940a.tar.gz px4-firmware-73d04f7a37ba52ce1891e740db554557bd71940a.tar.bz2 px4-firmware-73d04f7a37ba52ce1891e740db554557bd71940a.zip |
px4io driver: Only publish RC signal if it was at least once valid.
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 2c0078503..8eee1cbca 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1479,9 +1479,11 @@ PX4IO::io_publish_raw_rc() } else { rc_val.input_source = RC_INPUT_SOURCE_UNKNOWN; - /* we do not know the RC input, but have to publish timestamp_published - * and rc_lost flag, so do not prematurely return here - */ + /* only keep publishing RC input if we ever got a valid input */ + if (_rc_last_valid == 0) { + /* we have never seen valid RC signals, abort */ + return OK; + } } /* lazily advertise on first publication */ |