From f42dbeef82465d3e82c2a3d997dbdf40cfbafcb4 Mon Sep 17 00:00:00 2001 From: Claudio Chies Date: Fri, 18 Jul 2025 08:34:42 +0200 Subject: [PATCH] only publish input_rc, if the IO RC status in ok --- src/drivers/px4io/px4io.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 3e92eb9af2..cc0dcff776 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1030,7 +1030,10 @@ int PX4IO::io_publish_raw_rc() const bool rc_updated = (rc_valid_update_count != _rc_valid_update_count); _rc_valid_update_count = rc_valid_update_count; - if (!rc_updated) { + // only publish if the IO status indicates that the RC is OK + const uint16_t status_rc_ok = _status & PX4IO_P_STATUS_FLAGS_RC_OK; + + if (!rc_updated | !status_rc_ok) { return 0; }