mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 05:23:34 +08:00
Merge pull request #3195 from PX4/vtol_bench_test
VTOL: bench testing without airspeed reading
This commit is contained in:
@@ -154,7 +154,7 @@ void Standard::update_vtol_state()
|
|||||||
|
|
||||||
} else if (_vtol_schedule.flight_mode == TRANSITION_TO_FW) {
|
} else if (_vtol_schedule.flight_mode == TRANSITION_TO_FW) {
|
||||||
// continue the transition to fw mode while monitoring airspeed for a final switch to fw mode
|
// continue the transition to fw mode while monitoring airspeed for a final switch to fw mode
|
||||||
if (_airspeed->true_airspeed_m_s >= _params_standard.airspeed_trans) {
|
if (_airspeed->true_airspeed_m_s >= _params_standard.airspeed_trans || !_armed->armed) {
|
||||||
_vtol_schedule.flight_mode = FW_MODE;
|
_vtol_schedule.flight_mode = FW_MODE;
|
||||||
// we can turn off the multirotor motors now
|
// we can turn off the multirotor motors now
|
||||||
_flag_enable_mc_motors = false;
|
_flag_enable_mc_motors = false;
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ void Tiltrotor::update_vtol_state()
|
|||||||
case TRANSITION_FRONT_P1:
|
case TRANSITION_FRONT_P1:
|
||||||
|
|
||||||
// check if we have reached airspeed to switch to fw mode
|
// 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.flight_mode = TRANSITION_FRONT_P2;
|
||||||
_vtol_schedule.transition_start = hrt_absolute_time();
|
_vtol_schedule.transition_start = hrt_absolute_time();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user