From 5ee52138c4ac5c807888e3973099fd0f9a29aa59 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 27 Jan 2013 08:47:21 +1100 Subject: [PATCH] px4io: ensure RC_OK status flag is set on good input --- apps/px4io/controls.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/px4io/controls.c b/apps/px4io/controls.c index 0b2c199ee7..4782dc742c 100644 --- a/apps/px4io/controls.c +++ b/apps/px4io/controls.c @@ -198,8 +198,11 @@ controls_main(void) * This might happen if a protocol-based receiver returns an update * that contains no channels that we have mapped. */ - if (assigned_channels == 0) + if (assigned_channels == 0) { rc_input_lost = true; + } else { + r_status_flags |= PX4IO_P_STATUS_FLAGS_RC_OK; + } /* * Export the valid channel bitmap