Skip to content

Commit abffba8

Browse files
committed
AP_Scripting: fix behavior when when PLND_XY_DIST_MAX=0
1 parent 080c598 commit abffba8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/AP_Scripting/applets/plane_precland.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ local function update()
218218
return
219219
end
220220

221-
if xy_dist > PLND_XY_DIST_MAX:get() then
221+
if PLND_XY_DIST_MAX:get() > 0 and xy_dist > PLND_XY_DIST_MAX:get() then
222222
-- pause descent till we are within the given radius
223223
vehicle:set_land_descent_rate(0)
224224
end

0 commit comments

Comments
 (0)