mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
mc_pos_control: fix task activation failure for Transition
This commit is contained in:
parent
330941c1fc
commit
b3afa6ddac
@ -848,6 +848,7 @@ MulticopterPositionControl::start_flight_task()
|
||||
bool should_disable_task = true;
|
||||
int prev_failure_count = _task_failure_count;
|
||||
|
||||
// Do not run any flight task for VTOLs in fixed-wing mode
|
||||
if (!_vehicle_status.is_rotary_wing) {
|
||||
_flight_tasks.switchTask(FlightTaskIndex::None);
|
||||
return;
|
||||
@ -858,7 +859,9 @@ MulticopterPositionControl::start_flight_task()
|
||||
int error = _flight_tasks.switchTask(FlightTaskIndex::Transition);
|
||||
|
||||
if (error != 0) {
|
||||
PX4_WARN("Follow-Me activation failed with error: %s", _flight_tasks.errorToString(error));
|
||||
if (prev_failure_count == 0) {
|
||||
PX4_WARN("Transition activation failed with error: %s", _flight_tasks.errorToString(error));
|
||||
}
|
||||
task_failure = true;
|
||||
_task_failure_count++;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user