Skip to content

Commit 737bf0c

Browse files
committed
Plane: use get_relative_safe_alt_min_m and get_relative_safe_alt_max_m
1 parent 6ba69be commit 737bf0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ArduPlane/altitude.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,11 @@ void Plane::check_fbwb_altitude(void)
412412
// taking fence max and min altitude (with margin)
413413
const uint8_t enabled_fences = plane.fence.get_enabled_fences();
414414
if ((enabled_fences & AC_FENCE_TYPE_ALT_MIN) != 0) {
415-
min_alt_cm = plane.fence.get_safe_alt_min_m()*100.0;
415+
min_alt_cm = plane.fence.get_relative_safe_alt_min_m()*100.0;
416416
should_check_min = true;
417417
}
418418
if ((enabled_fences & AC_FENCE_TYPE_ALT_MAX) != 0) {
419-
max_alt_cm = plane.fence.get_safe_alt_max_m()*100.0;
419+
max_alt_cm = plane.fence.get_relative_safe_alt_max_m()*100.0;
420420
should_check_max = true;
421421
}
422422
#endif

0 commit comments

Comments
 (0)