mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-05 09:48:54 +08:00
FlightModeManager: Add task for position slow mode
This commit is contained in:
@@ -196,6 +196,13 @@ void FlightModeManager::start_flight_task()
|
||||
}
|
||||
}
|
||||
|
||||
// position slow mode
|
||||
if (_vehicle_status_sub.get().nav_state == vehicle_status_s::NAVIGATION_STATE_POSITION_SLOW) {
|
||||
found_some_task = true;
|
||||
FlightTaskError error = switchTask(FlightTaskIndex::ManualAccelerationSlow);
|
||||
task_failure = error != FlightTaskError::NoError;
|
||||
}
|
||||
|
||||
// Manual position control
|
||||
if ((_vehicle_status_sub.get().nav_state == vehicle_status_s::NAVIGATION_STATE_POSCTL) || task_failure) {
|
||||
found_some_task = true;
|
||||
|
||||
Reference in New Issue
Block a user