From 5e86be131c5d3231b8cc157e673f77d9c9a6173d Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Thu, 30 Apr 2026 23:40:44 +0200 Subject: [PATCH] fix(commander): Remove COM_OBC_LOSS_T (#27261) hardcoding the default 5 second timeout. --- ROMFS/px4fmu_common/init.d-posix/rcS | 4 ---- .../amovlab_f410/amovlabf410_drone_v1.15.4.params | 1 - src/modules/commander/Commander.cpp | 2 +- src/modules/commander/Commander.hpp | 1 - src/modules/commander/commander_params.yaml | 11 ----------- 5 files changed, 1 insertion(+), 18 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d-posix/rcS b/ROMFS/px4fmu_common/init.d-posix/rcS index 9c7c428ff8..8ce56eb640 100644 --- a/ROMFS/px4fmu_common/init.d-posix/rcS +++ b/ROMFS/px4fmu_common/init.d-posix/rcS @@ -198,10 +198,6 @@ if [ -n "$PX4_SIM_SPEED_FACTOR" ]; then COM_OF_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 1.0" | bc) echo "COM_OF_LOSS_T set to $COM_OF_LOSS_T_LONGER" param set COM_OF_LOSS_T $COM_OF_LOSS_T_LONGER - - COM_OBC_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 5.0" | bc) - echo "COM_OBC_LOSS_T set to $COM_OBC_LOSS_T_LONGER" - param set COM_OBC_LOSS_T $COM_OBC_LOSS_T_LONGER fi # Autostart ID diff --git a/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params b/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params index b31a34f073..309fa4045b 100644 --- a/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params +++ b/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params @@ -309,7 +309,6 @@ 1 1 COM_IMB_PROP_ACT 0 6 1 1 COM_LKDOWN_TKO 3.000000000000000000 9 1 1 COM_LOW_BAT_ACT 0 6 -1 1 COM_OBC_LOSS_T 5.000000000000000000 9 1 1 COM_OBL_RC_ACT 0 6 1 1 COM_OBS_AVOID 0 6 1 1 COM_OF_LOSS_T 1.000000000000000000 9 diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index f8c7f0f535..4671480295 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -2976,7 +2976,7 @@ void Commander::dataLinkCheck() // ONBOARD CONTROLLER data link loss failsafe if ((_datalink_last_heartbeat_onboard_controller > 0) - && (hrt_elapsed_time(&_datalink_last_heartbeat_onboard_controller) > (_param_com_obc_loss_t.get() * 1_s)) + && (hrt_elapsed_time(&_datalink_last_heartbeat_onboard_controller) > 5_s) && !_onboard_controller_lost) { mavlink_log_critical(&_mavlink_log_pub, "Connection to mission computer lost\t"); diff --git a/src/modules/commander/Commander.hpp b/src/modules/commander/Commander.hpp index 20af57787e..fec5aefaab 100644 --- a/src/modules/commander/Commander.hpp +++ b/src/modules/commander/Commander.hpp @@ -343,7 +343,6 @@ private: (ParamBool) _param_com_home_en, (ParamBool) _param_com_home_in_air, (ParamBool) _param_com_force_safety, - (ParamFloat) _param_com_obc_loss_t, (ParamInt) _param_com_prearm_mode, (ParamInt) _param_com_rc_override, (ParamFloat) _param_com_spoolup_time, diff --git a/src/modules/commander/commander_params.yaml b/src/modules/commander/commander_params.yaml index 2ff924f4ad..9859224f50 100644 --- a/src/modules/commander/commander_params.yaml +++ b/src/modules/commander/commander_params.yaml @@ -233,17 +233,6 @@ parameters: 6: Terminate 7: Disarm default: 0 - COM_OBC_LOSS_T: - description: - short: Onboard computer connection loss timeout - long: Time-out to wait when onboard computer connection is lost before warning - about loss connection - type: float - default: 5.0 - unit: s - min: 0 - max: 60 - increment: 0.01 COM_ARM_IMU_ACC: description: short: Max accelerometer inconsistency for arming