#OpsGroup - fix holding condition for FG at holding coordinate

This commit is contained in:
Applevangelist 2024-12-13 12:07:31 +01:00
parent ea55e90e62
commit 4fb2ad88bc
3 changed files with 21 additions and 1 deletions

View File

@ -1277,6 +1277,25 @@ function FLIGHTGROUP:Status()
end end
end end
--- check if we need to end holding
--self:T(self.lid.."Checking if we are holding at a holding point...")
if mission and mission.missionHoldingCoord and self.isHoldingAtHoldingPoint == true then
self:T(self.lid.."...yes")
if mission:IsReadyToPush() then
--self:T(self.lid.."Ready to push -> YES")
-- move flag to 1
self.flaghold:Set(1)
-- Not waiting any more.
self.Twaiting=nil
self.dTwait=nil
self.isHoldingAtHoldingPoint = false
--else
--self:T(self.lid.."Ready to push -> NO!")
end
--else
--self:T(self.lid.."...no")
end
-- If mission, check if DCS task needs to be updated. -- If mission, check if DCS task needs to be updated.
if mission and mission.updateDCSTask then if mission and mission.updateDCSTask then

View File

@ -6136,6 +6136,7 @@ function OPSGROUP:RouteToMission(mission, delay)
-- Add waypoint task. UpdateRoute is called inside. -- Add waypoint task. UpdateRoute is called inside.
local waypointtask=self:AddTaskWaypoint(DCSTasks, waypoint, "Holding") local waypointtask=self:AddTaskWaypoint(DCSTasks, waypoint, "Holding")
waypointtask.ismission=false waypointtask.ismission=false
self.isHoldingAtHoldingPoint = true
end end
if ingresscoord then if ingresscoord then

View File

@ -2528,7 +2528,7 @@ end
--- Function to save an object to a file --- Function to save an object to a file
-- @param #string Path The path to use. Use double backslashes \\\\ on Windows filesystems. -- @param #string Path The path to use. Use double backslashes \\\\ on Windows filesystems.
-- @param #string Filename The name of the file. Existing file will be overwritten. -- @param #string Filename The name of the file. Existing file will be overwritten.
-- @param #table Data The LUA data structure to save. This will be e.g. a table of text lines with an \\n at the end of each line. -- @param #string Data The data structure to save. This will be e.g. a string of text lines with an \\n at the end of each line.
-- @return #boolean outcome True if saving is possible, else false. -- @return #boolean outcome True if saving is possible, else false.
function UTILS.SaveToFile(Path,Filename,Data) function UTILS.SaveToFile(Path,Filename,Data)
-- Thanks to @FunkyFranky -- Thanks to @FunkyFranky