From 86f216703d4bfd37c93ea58ca6b44cb663e23ecb Mon Sep 17 00:00:00 2001 From: Tiziano Fiorenzani Date: Wed, 13 Nov 2024 16:30:42 +0000 Subject: [PATCH] AP_DDS: status topic to report RC failsafe with callback function --- libraries/AP_DDS/AP_DDS_Client.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_DDS/AP_DDS_Client.cpp b/libraries/AP_DDS/AP_DDS_Client.cpp index 05ba28f06d..a39240143f 100644 --- a/libraries/AP_DDS/AP_DDS_Client.cpp +++ b/libraries/AP_DDS/AP_DDS_Client.cpp @@ -632,15 +632,17 @@ bool AP_DDS_Client::update_topic(ardupilot_msgs_msg_Status& msg) msg.external_control = true; // Always true for now. To be filled after PR#28429. uint8_t fs_iter = 0; msg.failsafe_size = 0; - if (AP_Notify::flags.failsafe_radio) { + if (rc().in_rc_failsafe()) { msg.failsafe[fs_iter++] = FS_RADIO; } if (battery.has_failsafed()) { msg.failsafe[fs_iter++] = FS_BATTERY; } + // TODO: replace flag with function. if (AP_Notify::flags.failsafe_gcs) { msg.failsafe[fs_iter++] = FS_GCS; } + // TODO: replace flag with function. if (AP_Notify::flags.failsafe_ekf) { msg.failsafe[fs_iter++] = FS_EKF; }