forked from Archive/PX4-Autopilot
Only publish RC inputs if we have seen some valid inputs at some point
This commit is contained in:
parent
c6d98a32f8
commit
64ffafb48e
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue