mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Update OpsGroup.lua
This commit is contained in:
parent
8f56299380
commit
209b7a64ed
@ -2327,7 +2327,7 @@ function OPSGROUP:onafterTaskDone(From, Event, To, Task)
|
|||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
local text=string.format("Task done: %s ID=%d", Task.description, Task.id)
|
local text=string.format("Task done: %s ID=%d", Task.description, Task.id)
|
||||||
self:I(self.lid..text)
|
self:T(self.lid..text)
|
||||||
|
|
||||||
-- No current task.
|
-- No current task.
|
||||||
if Task.id==self.taskcurrent then
|
if Task.id==self.taskcurrent then
|
||||||
@ -2647,7 +2647,7 @@ function OPSGROUP:onafterPauseMission(From, Event, To)
|
|||||||
local Task=Mission:GetGroupWaypointTask(self)
|
local Task=Mission:GetGroupWaypointTask(self)
|
||||||
|
|
||||||
-- Debug message.
|
-- Debug message.
|
||||||
self:I(self.lid..string.format("Pausing current mission %s. Task=%s", tostring(Mission.name), tostring(Task and Task.description or "WTF")))
|
self:T(self.lid..string.format("Pausing current mission %s. Task=%s", tostring(Mission.name), tostring(Task and Task.description or "WTF")))
|
||||||
|
|
||||||
-- Cancelling the mission is actually cancelling the current task.
|
-- Cancelling the mission is actually cancelling the current task.
|
||||||
self:TaskCancel(Task)
|
self:TaskCancel(Task)
|
||||||
@ -2666,7 +2666,8 @@ end
|
|||||||
-- @param #string To To state.
|
-- @param #string To To state.
|
||||||
function OPSGROUP:onafterUnpauseMission(From, Event, To)
|
function OPSGROUP:onafterUnpauseMission(From, Event, To)
|
||||||
|
|
||||||
self:I(self.lid..string.format("Unpausing mission"))
|
-- Debug info.
|
||||||
|
self:T(self.lid..string.format("Unpausing mission"))
|
||||||
|
|
||||||
if self.missionpaused then
|
if self.missionpaused then
|
||||||
|
|
||||||
@ -4796,6 +4797,8 @@ function OPSGROUP:SwitchAlarmstate(alarmstate)
|
|||||||
|
|
||||||
if self:IsAlive() or self:IsInUtero() then
|
if self:IsAlive() or self:IsInUtero() then
|
||||||
|
|
||||||
|
if self.isArmygroup or self.isNavygroup then
|
||||||
|
|
||||||
self.option.Alarm=alarmstate or self.optionDefault.Alarm
|
self.option.Alarm=alarmstate or self.optionDefault.Alarm
|
||||||
|
|
||||||
if self:IsInUtero() then
|
if self:IsInUtero() then
|
||||||
@ -4817,6 +4820,8 @@ function OPSGROUP:SwitchAlarmstate(alarmstate)
|
|||||||
self:T(self.lid..string.format("Setting current Alarm State=%d (0=Auto, 1=Green, 2=Red)", self.option.Alarm))
|
self:T(self.lid..string.format("Setting current Alarm State=%d (0=Auto, 1=Green, 2=Red)", self.option.Alarm))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self:E(self.lid.."WARNING: Cannot switch Alarm State! Group is not alive.")
|
self:E(self.lid.."WARNING: Cannot switch Alarm State! Group is not alive.")
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user