mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#OpsGroup - fix holding condition for FG at holding coordinate
This commit is contained in:
parent
ea55e90e62
commit
4fb2ad88bc
@ -1277,6 +1277,25 @@ function FLIGHTGROUP:Status()
|
||||
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 and mission.updateDCSTask then
|
||||
|
||||
|
||||
@ -6136,6 +6136,7 @@ function OPSGROUP:RouteToMission(mission, delay)
|
||||
-- Add waypoint task. UpdateRoute is called inside.
|
||||
local waypointtask=self:AddTaskWaypoint(DCSTasks, waypoint, "Holding")
|
||||
waypointtask.ismission=false
|
||||
self.isHoldingAtHoldingPoint = true
|
||||
end
|
||||
|
||||
if ingresscoord then
|
||||
|
||||
@ -2528,7 +2528,7 @@ end
|
||||
--- Function to save an object to a file
|
||||
-- @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 #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.
|
||||
function UTILS.SaveToFile(Path,Filename,Data)
|
||||
-- Thanks to @FunkyFranky
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user