mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 10:13:34 +08:00
added auto takeoff support, updated configuration for solo and generalized landing mission items
This commit is contained in:
committed by
Lorenz Meier
parent
3847c826ec
commit
fbf42c8949
@@ -142,6 +142,7 @@ Navigator::Navigator() :
|
||||
_mission(this, "MIS"),
|
||||
_loiter(this, "LOI"),
|
||||
_takeoff(this, "TKF"),
|
||||
_land(this, "LND"),
|
||||
_rtl(this, "RTL"),
|
||||
_rcLoss(this, "RCL"),
|
||||
_dataLinkLoss(this, "DLL"),
|
||||
@@ -161,6 +162,7 @@ Navigator::Navigator() :
|
||||
_navigation_mode_array[5] = &_gpsFailure;
|
||||
_navigation_mode_array[6] = &_rcLoss;
|
||||
_navigation_mode_array[7] = &_takeoff;
|
||||
_navigation_mode_array[8] = &_land;
|
||||
|
||||
updateParams();
|
||||
}
|
||||
@@ -444,7 +446,6 @@ Navigator::task_main()
|
||||
case vehicle_status_s::NAVIGATION_STATE_ACRO:
|
||||
case vehicle_status_s::NAVIGATION_STATE_ALTCTL:
|
||||
case vehicle_status_s::NAVIGATION_STATE_POSCTL:
|
||||
case vehicle_status_s::NAVIGATION_STATE_LAND:
|
||||
case vehicle_status_s::NAVIGATION_STATE_TERMINATION:
|
||||
case vehicle_status_s::NAVIGATION_STATE_OFFBOARD:
|
||||
_navigation_mode = nullptr;
|
||||
@@ -481,6 +482,10 @@ Navigator::task_main()
|
||||
_pos_sp_triplet_published_invalid_once = false;
|
||||
_navigation_mode = &_takeoff;
|
||||
break;
|
||||
case vehicle_status_s::NAVIGATION_STATE_LAND:
|
||||
_pos_sp_triplet_published_invalid_once = false;
|
||||
_navigation_mode = &_land;
|
||||
break;
|
||||
case vehicle_status_s::NAVIGATION_STATE_AUTO_RTGS:
|
||||
/* Use complex data link loss mode only when enabled via param
|
||||
* otherwise use rtl */
|
||||
|
||||
Reference in New Issue
Block a user