AC_Fence: replace "_ina->geT_position().z" with more efficent
"_inav->get_altitude()"
This commit is contained in:
parent
596c7a25b7
commit
b94d6848de
@ -120,7 +120,7 @@ uint8_t AC_Fence::check_fence()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get current altitude in meters
|
// get current altitude in meters
|
||||||
float curr_alt = _inav->get_position().z * 0.01f;
|
float curr_alt = _inav->get_altitude() * 0.01f;
|
||||||
|
|
||||||
// altitude fence check
|
// altitude fence check
|
||||||
if ((_enabled_fences & AC_FENCE_TYPE_ALT_MAX) != 0) {
|
if ((_enabled_fences & AC_FENCE_TYPE_ALT_MAX) != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user