vtol: allow switch to fw mode without airspeed reading to facilitate bench testing

This commit is contained in:
tumbili
2015-11-17 09:14:40 +01:00
parent ee2ce77c82
commit 2b50297c2e
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -205,7 +205,8 @@ void Tiltrotor::update_vtol_state()
case TRANSITION_FRONT_P1:
// check if we have reached airspeed to switch to fw mode
if (_airspeed->true_airspeed_m_s >= _params_tiltrotor.airspeed_trans) {
// also allow switch if we are not armed for the sake of bench testing
if (_airspeed->true_airspeed_m_s >= _params_tiltrotor.airspeed_trans || !_armed->armed) {
_vtol_schedule.flight_mode = TRANSITION_FRONT_P2;
_vtol_schedule.transition_start = hrt_absolute_time();
}