AC_Fence: replace "_ina->geT_position().z" with more efficent

"_inav->get_altitude()"
This commit is contained in:
Tobias 2013-07-24 16:09:31 +02:00 committed by Randy Mackay
parent 596c7a25b7
commit b94d6848de

View File

@ -120,7 +120,7 @@ uint8_t AC_Fence::check_fence()
}
// 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
if ((_enabled_fences & AC_FENCE_TYPE_ALT_MAX) != 0) {