Skip to content

Commit

Permalink
#234: Block creating of AB track via the UI when the points are on th…
Browse files Browse the repository at this point in the history
…e same place.
  • Loading branch information
stijnwop committed Feb 5, 2022
1 parent 88b70a7 commit 4c7bdd5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/frames/GuidanceSteeringStrategyFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,13 @@ function GuidanceSteeringStrategyFrame:onClickSetPointB()
end

local spec = vehicle.spec_globalPositioningSystem

if spec.lineStrategy:getIsABDirectionPossible() then
if spec.abDistanceCounter < GlobalPositioningSystem.AB_DROP_DISTANCE then
g_currentMission:showBlinkingWarning(g_i18n:getText("guidanceSteering_warning_dropDistance"):format(spec.abDistanceCounter), 4000)
return
end

-- Make sure the multi action event isn't doing anything in the meantime.
spec.multiActionEvent:reset()

Expand Down

0 comments on commit 4c7bdd5

Please sign in to comment.