px4io: ensure RC_OK status flag is set on good input

This commit is contained in:
Andrew Tridgell 2013-01-27 08:47:21 +11:00 committed by px4dev
parent 52ff9b7d43
commit 5ee52138c4
1 changed files with 4 additions and 1 deletions

View File

@ -198,8 +198,11 @@ controls_main(void)
* This might happen if a protocol-based receiver returns an update * This might happen if a protocol-based receiver returns an update
* that contains no channels that we have mapped. * that contains no channels that we have mapped.
*/ */
if (assigned_channels == 0) if (assigned_channels == 0) {
rc_input_lost = true; rc_input_lost = true;
} else {
r_status_flags |= PX4IO_P_STATUS_FLAGS_RC_OK;
}
/* /*
* Export the valid channel bitmap * Export the valid channel bitmap