diff --git a/src/modules/mc_pos_control/mc_pos_control_main.cpp b/src/modules/mc_pos_control/mc_pos_control_main.cpp index 4747130569..10e5991e1f 100644 --- a/src/modules/mc_pos_control/mc_pos_control_main.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_main.cpp @@ -254,7 +254,7 @@ private: * to true, the failsafe will be initiated immediately. */ void failsafe(vehicle_local_position_setpoint_s &setpoint, const PositionControlStates &states, const bool force, - const bool warn); + bool warn); /** * Reset setpoints to NAN @@ -921,8 +921,13 @@ MulticopterPositionControl::limit_thrust_during_landing(vehicle_attitude_setpoin void MulticopterPositionControl::failsafe(vehicle_local_position_setpoint_s &setpoint, const PositionControlStates &states, - const bool force, const bool warn) + const bool force, bool warn) { + // do not warn while we are disarmed, as we might not have valid setpoints yet + if (!_control_mode.flag_armed) { + warn = false; + } + _failsafe_land_hysteresis.set_state_and_update(true, hrt_absolute_time()); if (!_failsafe_land_hysteresis.get_state() && !force) {