forked from Archive/PX4-Autopilot
FlightModeManager: avoid internal flight task running concurrently with external mode
This commit is contained in:
parent
a72f2517ea
commit
0dcecf0666
|
@ -137,7 +137,9 @@ void FlightModeManager::updateParams()
|
|||
void FlightModeManager::start_flight_task()
|
||||
{
|
||||
// Do not run any flight task for VTOLs in fixed-wing mode
|
||||
if (_vehicle_status_sub.get().vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING) {
|
||||
if ((_vehicle_status_sub.get().vehicle_type == vehicle_status_s::VEHICLE_TYPE_FIXED_WING)
|
||||
|| ((_vehicle_status_sub.get().nav_state >= vehicle_status_s::NAVIGATION_STATE_EXTERNAL1)
|
||||
&& (_vehicle_status_sub.get().nav_state <= vehicle_status_s::NAVIGATION_STATE_EXTERNAL8))) {
|
||||
switchTask(FlightTaskIndex::None);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue