diff --git a/src/modules/vtol_att_control/tiltrotor.cpp b/src/modules/vtol_att_control/tiltrotor.cpp index b5794c6a8f..1bab60fc96 100644 --- a/src/modules/vtol_att_control/tiltrotor.cpp +++ b/src/modules/vtol_att_control/tiltrotor.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2015 PX4 Development Team. All rights reserved. + * Copyright (c) 2015-2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -182,6 +182,14 @@ void Tiltrotor::update_vtol_state() _vtol_schedule.transition_start = hrt_absolute_time(); } + // check front transition timeout + if (_params->front_trans_timeout > FLT_EPSILON) { + if (time_since_trans_start > _params->front_trans_timeout) { + // transition timeout occured, abort transition + _attc->quadchute(VtolAttitudeControl::QuadchuteReason::TransitionTimeout); + } + } + break; }