mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 00:04:02 -04:00
Copter: Add Smart RTL or LAND to the fence action
This commit is contained in:
parent
a97786c01d
commit
17f285b68f
@ -64,6 +64,12 @@ void Copter::fence_check()
|
|||||||
set_mode(Mode::Number::LAND, ModeReason::FENCE_BREACHED);
|
set_mode(Mode::Number::LAND, ModeReason::FENCE_BREACHED);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case AC_FENCE_ACTION_SMART_RTL_OR_LAND:
|
||||||
|
// Try SmartRTL, if that fails, Land
|
||||||
|
if (!set_mode(Mode::Number::SMART_RTL, ModeReason::FENCE_BREACHED)) {
|
||||||
|
set_mode(Mode::Number::LAND, ModeReason::FENCE_BREACHED);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user