mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-20 22:03:25 +00:00
Update FlightGroup.lua
This commit is contained in:
@@ -402,7 +402,7 @@ function FLIGHTGROUP:onafterFlightStatus(From, Event, To)
|
||||
local fsmstate=self:GetState()
|
||||
|
||||
-- Short info.
|
||||
local text=string.format("Flight group status %s.", fsmstate)
|
||||
local text=string.format("Flight group status %s. Task=%d", fsmstate, self.taskcurrent)
|
||||
self:I(self.sid..text)
|
||||
|
||||
-- Element status.
|
||||
@@ -434,6 +434,8 @@ function FLIGHTGROUP:onafterFlightStatus(From, Event, To)
|
||||
-- Get task from queue.
|
||||
local task=self:GetTask()
|
||||
|
||||
self:I({self.sid, task=task})
|
||||
|
||||
-- Execute task if any.
|
||||
if task then
|
||||
self:TaskExecute(task)
|
||||
@@ -870,7 +872,7 @@ function FLIGHTGROUP:GetTask()
|
||||
-- Look for first task that is not accomplished.
|
||||
for _,_task in pairs(self.taskqueue) do
|
||||
local task=_task --#FLIGHTGROUP.Task
|
||||
if task.status~=FLIGHTGROUP.TaskStatus.ACCOMPLISHED and task.time>=time then
|
||||
if task.status~=FLIGHTGROUP.TaskStatus.ACCOMPLISHED and time>=task.time then
|
||||
return task
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user