mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Ops
This commit is contained in:
@@ -561,7 +561,8 @@ do -- COORDINATE
|
||||
return self
|
||||
else
|
||||
--env.info("FF translate with NEW coordinate T="..timer.getTime())
|
||||
return COORDINATE:New(x, y, z)
|
||||
local coord=COORDINATE:New(x, y, z)
|
||||
return coord
|
||||
end
|
||||
|
||||
end
|
||||
@@ -761,7 +762,8 @@ do -- COORDINATE
|
||||
-- Move the vector to start at the end of A.
|
||||
vec=UTILS.VecAdd(self, vec)
|
||||
|
||||
return self:New(vec.x,vec.y,vec.z)
|
||||
local coord=COORDINATE:New(vec.x,vec.y,vec.z)
|
||||
return coord
|
||||
end
|
||||
|
||||
--- Return the 2D distance in meters between the target COORDINATE and the COORDINATE.
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
--
|
||||
-- The TIMER class is the little sister of the SCHEDULER class. It does the same thing but is a bit easier to use and has less overhead. It should be sufficient in many cases.
|
||||
--
|
||||
-- It provides an easy interface to the DCS [timer.scheduleFunction](https://wiki.hoggitworld.com/view/DCS_func_scheduleFunction).
|
||||
--
|
||||
-- # Construction
|
||||
--
|
||||
-- A new TIMER is created by the @{#TIMER.New}(*func*, *...*) function
|
||||
@@ -104,7 +106,7 @@ TIMER = {
|
||||
_TIMERID=0
|
||||
|
||||
--- Timer data base.
|
||||
_TIMERDB={}
|
||||
--_TIMERDB={}
|
||||
|
||||
--- TIMER class version.
|
||||
-- @field #string version
|
||||
@@ -150,7 +152,7 @@ function TIMER:New(Function, ...)
|
||||
self.lid=string.format("TIMER UID=%d | ", self.uid)
|
||||
|
||||
-- Add to DB.
|
||||
_TIMERDB[self.uid]=self
|
||||
--_TIMERDB[self.uid]=self
|
||||
|
||||
return self
|
||||
end
|
||||
@@ -208,7 +210,7 @@ function TIMER:Stop(Delay)
|
||||
timer.removeFunction(self.tid)
|
||||
|
||||
-- Remove DB entry.
|
||||
_TIMERDB[self.uid]=nil
|
||||
--_TIMERDB[self.uid]=nil
|
||||
|
||||
end
|
||||
|
||||
@@ -232,8 +234,6 @@ end
|
||||
-- @return #number Time when the function is called again or `nil` if the timer is stopped.
|
||||
function TIMER:_Function(time)
|
||||
|
||||
--self:I(self.lid.."FF calling timer _Function")
|
||||
|
||||
-- Call function.
|
||||
self.func(unpack(self.para))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user