mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
MulticopterPositionControl: don't switch out of Orbit task
when it got started via vehicle_command
This commit is contained in:
committed by
Daniel Agar
parent
8f40558f41
commit
de66616341
@@ -478,7 +478,9 @@ void MulticopterPositionControl::start_flight_task()
|
||||
}
|
||||
|
||||
// Switch to clean new task when mode switches e.g. to reset state when switching between auto modes
|
||||
if (_last_vehicle_nav_state != _vehicle_status.nav_state) {
|
||||
// exclude Orbit mode since the task is initiated in FlightTasks through the vehicle_command and we should not switch out
|
||||
if (_last_vehicle_nav_state != _vehicle_status.nav_state
|
||||
&& _vehicle_status.nav_state != vehicle_status_s::NAVIGATION_STATE_ORBIT) {
|
||||
_flight_tasks.switchTask(FlightTaskIndex::None);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user