AP_AdvancedFailsafe: Report MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION

This commit is contained in:
Michael du Breuil 2018-02-02 12:20:19 -07:00 committed by Randy Mackay
parent f189ce5c68
commit 200aacea43
1 changed files with 3 additions and 0 deletions

View File

@ -156,6 +156,9 @@ AP_AdvancedFailsafe::check(uint32_t last_heartbeat_ms, bool geofence_breached, u
if (!_enable) {
return;
}
// only set the termination capability, clearing it can mess up copter and sub which can always be terminated
hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION);
// we always check for fence breach
if(_enable_geofence_fs) {
if (geofence_breached || check_altlimit()) {