|
|
|
@ -129,7 +129,7 @@ bool Sub::guided_set_destination(const Vector3f& destination)
@@ -129,7 +129,7 @@ bool Sub::guided_set_destination(const Vector3f& destination)
|
|
|
|
|
guided_pos_control_start(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if AC_FENCE == ENABLED |
|
|
|
|
#if AP_FENCE_ENABLED |
|
|
|
|
// reject destination if outside the fence
|
|
|
|
|
const Location dest_loc(destination, Location::AltFrame::ABOVE_ORIGIN); |
|
|
|
|
if (!fence.check_destination_within_fence(dest_loc)) { |
|
|
|
@ -157,7 +157,7 @@ bool Sub::guided_set_destination(const Location& dest_loc)
@@ -157,7 +157,7 @@ bool Sub::guided_set_destination(const Location& dest_loc)
|
|
|
|
|
guided_pos_control_start(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if AC_FENCE == ENABLED |
|
|
|
|
#if AP_FENCE_ENABLED |
|
|
|
|
// reject destination outside the fence.
|
|
|
|
|
// Note: there is a danger that a target specified as a terrain altitude might not be checked if the conversion to alt-above-home fails
|
|
|
|
|
if (!fence.check_destination_within_fence(dest_loc)) { |
|
|
|
@ -201,7 +201,7 @@ bool Sub::guided_set_destination_posvel(const Vector3f& destination, const Vecto
@@ -201,7 +201,7 @@ bool Sub::guided_set_destination_posvel(const Vector3f& destination, const Vecto
|
|
|
|
|
guided_posvel_control_start(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if AC_FENCE == ENABLED |
|
|
|
|
#if AP_FENCE_ENABLED |
|
|
|
|
// reject destination if outside the fence
|
|
|
|
|
const Location dest_loc(destination, Location::AltFrame::ABOVE_ORIGIN); |
|
|
|
|
if (!fence.check_destination_within_fence(dest_loc)) { |
|
|
|
|