VTOL force land even when transitioning to FW (#8958)

This commit is contained in:
Sander Smeets 2018-03-01 22:51:50 +01:00 committed by Daniel Agar
parent ff86d15c13
commit 2ef9c4ec35
3 changed files with 10 additions and 2 deletions

View File

@ -260,7 +260,7 @@ public:
float get_vtol_back_trans_deceleration() const { return _param_back_trans_dec_mss.get(); }
float get_vtol_reverse_delay() const { return _param_reverse_delay.get(); }
bool force_vtol() const { return _vstatus.is_vtol && !_vstatus.is_rotary_wing && _param_force_vtol.get(); }
bool force_vtol();
private:

View File

@ -1099,6 +1099,14 @@ Navigator::abort_landing()
return should_abort;
}
bool
Navigator::force_vtol()
{
return _vstatus.is_vtol &&
(!_vstatus.is_rotary_wing || _vstatus.in_transition_to_fw)
&& _param_force_vtol.get();
}
static void usage()
{
PX4_INFO("usage: navigator {start|stop|status|fencefile}");

View File

@ -209,7 +209,7 @@ PARAM_DEFINE_FLOAT(VT_TRANS_TIMEOUT, 15.0f);
*
* @unit s
* @min 0.0
* @max 10.0
* @max 20.0
* @group VTOL Attitude Control
*/
PARAM_DEFINE_FLOAT(VT_TRANS_MIN_TM, 2.0f);