From 9f4ae0a85d48c6c5f189d6c2ffe99173d8171a8f Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Tue, 12 Mar 2024 13:27:13 +0100 Subject: [PATCH] vtol: only publish generic warning through mavlink to safe flash (#22870) Signed-off-by: Silvan Fuhrer --- src/modules/vtol_att_control/vtol_att_control_main.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/modules/vtol_att_control/vtol_att_control_main.cpp b/src/modules/vtol_att_control/vtol_att_control_main.cpp index eccdf78305..b464793c99 100644 --- a/src/modules/vtol_att_control/vtol_att_control_main.cpp +++ b/src/modules/vtol_att_control/vtol_att_control_main.cpp @@ -206,45 +206,41 @@ void VtolAttitudeControl::quadchute(QuadchuteReason reason) { if (!_vtol_vehicle_status.fixed_wing_system_failure) { + // only publish generic warning through mavlink to safe flash + mavlink_log_critical(&_mavlink_log_pub, "Quad-chute triggered\t"); + switch (reason) { case QuadchuteReason::TransitionTimeout: - mavlink_log_critical(&_mavlink_log_pub, "Quadchute: transition timeout\t"); events::send(events::ID("vtol_att_ctrl_quadchute_tout"), events::Log::Critical, "Quad-chute triggered due to transition timeout"); break; case QuadchuteReason::ExternalCommand: - mavlink_log_critical(&_mavlink_log_pub, "Quadchute: external command\t"); events::send(events::ID("vtol_att_ctrl_quadchute_ext_cmd"), events::Log::Critical, "Quad-chute triggered due to external command"); break; case QuadchuteReason::MinimumAltBreached: - mavlink_log_critical(&_mavlink_log_pub, "Quadchute: minimum altitude breached\t"); events::send(events::ID("vtol_att_ctrl_quadchute_min_alt"), events::Log::Critical, "Quad-chute triggered due to minimum altitude breach"); break; case QuadchuteReason::UncommandedDescent: - mavlink_log_critical(&_mavlink_log_pub, "Quadchute: Uncommanded descent detected\t"); events::send(events::ID("vtol_att_ctrl_quadchute_alt_loss"), events::Log::Critical, "Quad-chute triggered due to uncommanded descent detection"); break; case QuadchuteReason::TransitionAltitudeLoss: - mavlink_log_critical(&_mavlink_log_pub, "Quadchute: loss of altitude during transition\t"); events::send(events::ID("vtol_att_ctrl_quadchute_trans_alt_err"), events::Log::Critical, "Quad-chute triggered due to loss of altitude during transition"); break; case QuadchuteReason::MaximumPitchExceeded: - mavlink_log_critical(&_mavlink_log_pub, "Quadchute: maximum pitch exceeded\t"); events::send(events::ID("vtol_att_ctrl_quadchute_max_pitch"), events::Log::Critical, "Quad-chute triggered due to maximum pitch angle exceeded"); break; case QuadchuteReason::MaximumRollExceeded: - mavlink_log_critical(&_mavlink_log_pub, "Quadchute: maximum roll exceeded\t"); events::send(events::ID("vtol_att_ctrl_quadchute_max_roll"), events::Log::Critical, "Quad-chute triggered due to maximum roll angle exceeded"); break;