From e34cc2953c064ba55be4472339afe3e43a41de26 Mon Sep 17 00:00:00 2001 From: Balduin Date: Mon, 5 Jan 2026 18:36:02 +0100 Subject: [PATCH] FwLateralLongitudinalControl: publish flight phase cherrypicked from https://github.com/PX4/PX4-Autopilot/pull/26219. remove when rebasing on that. --- .../FwLateralLongitudinalControl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/fw_lateral_longitudinal_control/FwLateralLongitudinalControl.cpp b/src/modules/fw_lateral_longitudinal_control/FwLateralLongitudinalControl.cpp index 53005d8ba5..333d2aac27 100644 --- a/src/modules/fw_lateral_longitudinal_control/FwLateralLongitudinalControl.cpp +++ b/src/modules/fw_lateral_longitudinal_control/FwLateralLongitudinalControl.cpp @@ -165,8 +165,6 @@ void FwLateralLongitudinalControl::Run() _landed = landed.landed; } - _flight_phase_estimation_pub.get().flight_phase = flight_phase_estimation_s::FLIGHT_PHASE_UNKNOWN; - _vehicle_status_sub.update(); _control_mode_sub.update(); @@ -420,8 +418,13 @@ FwLateralLongitudinalControl::tecs_update_pitch_throttle(const float control_int _flight_phase_estimation_pub.get().flight_phase = flight_phase_estimation_s::FLIGHT_PHASE_DESCEND; } else { - //We can't infer the flight phase , do nothing, estimation is reset at each step + // We can't infer the flight phase , do nothing, estimation is reset at each step + _flight_phase_estimation_pub.get().flight_phase = flight_phase_estimation_s::FLIGHT_PHASE_UNKNOWN; + } + + _flight_phase_estimation_pub.get().timestamp = hrt_absolute_time(); + _flight_phase_estimation_pub.update(); } }