mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Removing noise
This commit is contained in:
parent
d7801b59e7
commit
ab93866366
@ -1977,7 +1977,7 @@ function AUFTRAG:_DetermineAuftragType(Target)
|
||||
auftrag=AUFTRAG.Type.ANTISHIP
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Unknown Group category!")
|
||||
self:T(self.lid.."ERROR: Unknown Group category!")
|
||||
end
|
||||
|
||||
elseif airbase then
|
||||
@ -3237,7 +3237,7 @@ function AUFTRAG:onafterStatus(From, Event, To)
|
||||
|
||||
-- Check for error.
|
||||
if fsmstate~=self.status then
|
||||
self:E(self.lid..string.format("ERROR: FSM state %s != %s mission status!", fsmstate, self.status))
|
||||
self:T(self.lid..string.format("ERROR: FSM state %s != %s mission status!", fsmstate, self.status))
|
||||
end
|
||||
|
||||
-- General info.
|
||||
@ -3447,7 +3447,7 @@ function AUFTRAG:SetGroupStatus(opsgroup, status)
|
||||
if groupdata then
|
||||
groupdata.status=status
|
||||
else
|
||||
self:E(self.lid.."WARNING: Could not SET flight data for flight group. Setting status to DONE")
|
||||
self:T(self.lid.."WARNING: Could not SET flight data for flight group. Setting status to DONE")
|
||||
end
|
||||
end
|
||||
|
||||
@ -3484,7 +3484,7 @@ function AUFTRAG:GetGroupStatus(opsgroup)
|
||||
return groupdata.status
|
||||
else
|
||||
|
||||
self:E(self.lid..string.format("WARNING: Could not GET groupdata for opsgroup %s. Returning status DONE.", opsgroup and opsgroup.groupname or "nil"))
|
||||
self:T(self.lid..string.format("WARNING: Could not GET groupdata for opsgroup %s. Returning status DONE.", opsgroup and opsgroup.groupname or "nil"))
|
||||
return AUFTRAG.GroupStatus.DONE
|
||||
|
||||
end
|
||||
@ -3522,7 +3522,7 @@ function AUFTRAG:RemoveLegion(Legion)
|
||||
end
|
||||
end
|
||||
|
||||
self:E(self.lid..string.format("ERROR: Legion %s not found and could not be removed!", Legion.alias))
|
||||
self:T(self.lid..string.format("ERROR: Legion %s not found and could not be removed!", Legion.alias))
|
||||
return self
|
||||
end
|
||||
|
||||
@ -4385,7 +4385,7 @@ function AUFTRAG:GetTargetCoordinate()
|
||||
return coord
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Cannot get target coordinate!")
|
||||
self:T(self.lid.."ERROR: Cannot get target coordinate!")
|
||||
end
|
||||
|
||||
return nil
|
||||
@ -4416,7 +4416,7 @@ function AUFTRAG:GetTargetDistance(FromCoord)
|
||||
if TargetCoord and FromCoord then
|
||||
return TargetCoord:Get2DDistance(FromCoord)
|
||||
else
|
||||
self:E(self.lid.."ERROR: TargetCoord or FromCoord does not exist in AUFTRAG:GetTargetDistance() function! Returning 0")
|
||||
self:T(self.lid.."ERROR: TargetCoord or FromCoord does not exist in AUFTRAG:GetTargetDistance() function! Returning 0")
|
||||
end
|
||||
|
||||
return 0
|
||||
@ -5028,7 +5028,7 @@ function AUFTRAG:GetDCSMissionTask(TaskControllable)
|
||||
table.insert(DCStasks, DCStask)
|
||||
|
||||
else
|
||||
self:E(self.lid..string.format("ERROR: Unknown mission task!"))
|
||||
self:T(self.lid..string.format("ERROR: Unknown mission task!"))
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
@ -4218,7 +4218,7 @@ end
|
||||
|
||||
local statics = nil
|
||||
local statics = {}
|
||||
self:I(self.lid.."Bulding Statics Table for Saving")
|
||||
self:T(self.lid.."Bulding Statics Table for Saving")
|
||||
for _,_cargo in pairs (stcstable) do
|
||||
local cargo = _cargo -- #CTLD_CARGO
|
||||
local object = cargo:GetPositionable() -- Wrapper.Static#STATIC
|
||||
|
||||
@ -511,7 +511,7 @@ function OPSGROUP:New(group)
|
||||
-- Check if group exists.
|
||||
if self.group then
|
||||
if not self:IsExist() then
|
||||
self:E(self.lid.."ERROR: GROUP does not exist! Returning nil")
|
||||
self:T(self.lid.."ERROR: GROUP does not exist! Returning nil")
|
||||
return nil
|
||||
end
|
||||
end
|
||||
@ -1381,7 +1381,7 @@ function OPSGROUP:GetCoordinate(NewObject)
|
||||
return self.coordinate
|
||||
end
|
||||
else
|
||||
self:E(self.lid.."WARNING: Cannot get coordinate!")
|
||||
self:T(self.lid.."WARNING: Cannot get coordinate!")
|
||||
end
|
||||
|
||||
return nil
|
||||
@ -1412,11 +1412,11 @@ function OPSGROUP:GetVelocity(UnitName)
|
||||
return vel
|
||||
|
||||
else
|
||||
self:E(self.lid.."WARNING: Unit does not exist. Cannot get velocity!")
|
||||
self:T(self.lid.."WARNING: Unit does not exist. Cannot get velocity!")
|
||||
end
|
||||
|
||||
else
|
||||
self:E(self.lid.."WARNING: Group does not exist. Cannot get velocity!")
|
||||
self:T(self.lid.."WARNING: Group does not exist. Cannot get velocity!")
|
||||
end
|
||||
|
||||
return nil
|
||||
@ -1453,7 +1453,7 @@ function OPSGROUP:GetHeading(UnitName)
|
||||
end
|
||||
|
||||
else
|
||||
self:E(self.lid.."WARNING: Group does not exist. Cannot get heading!")
|
||||
self:T(self.lid.."WARNING: Group does not exist. Cannot get heading!")
|
||||
end
|
||||
|
||||
return nil
|
||||
@ -1485,7 +1485,7 @@ function OPSGROUP:GetOrientation(UnitName)
|
||||
end
|
||||
|
||||
else
|
||||
self:E(self.lid.."WARNING: Group does not exist. Cannot get orientation!")
|
||||
self:T(self.lid.."WARNING: Group does not exist. Cannot get orientation!")
|
||||
end
|
||||
|
||||
return nil
|
||||
@ -1723,9 +1723,9 @@ function OPSGROUP:Activate(delay)
|
||||
self.isLateActivated=false
|
||||
|
||||
elseif self:IsAlive()==true then
|
||||
self:E(self.lid.."WARNING: Activating group that is already activated")
|
||||
self:T(self.lid.."WARNING: Activating group that is already activated")
|
||||
else
|
||||
self:E(self.lid.."ERROR: Activating group that is does not exist!")
|
||||
self:T(self.lid.."ERROR: Activating group that is does not exist!")
|
||||
end
|
||||
|
||||
end
|
||||
@ -2789,13 +2789,13 @@ function OPSGROUP:RemoveWaypoint(wpindex)
|
||||
|
||||
-- Always keep at least one waypoint.
|
||||
if N==1 then
|
||||
self:E(self.lid..string.format("ERROR: Cannot remove waypoint with index=%d! It is the only waypoint and a group needs at least ONE waypoint", wpindex))
|
||||
self:T(self.lid..string.format("ERROR: Cannot remove waypoint with index=%d! It is the only waypoint and a group needs at least ONE waypoint", wpindex))
|
||||
return self
|
||||
end
|
||||
|
||||
-- Check that wpindex is not larger than the number of waypoints in the table.
|
||||
if wpindex>N then
|
||||
self:E(self.lid..string.format("ERROR: Cannot remove waypoint with index=%d as there are only N=%d waypoints!", wpindex, N))
|
||||
self:T(self.lid..string.format("ERROR: Cannot remove waypoint with index=%d as there are only N=%d waypoints!", wpindex, N))
|
||||
return self
|
||||
end
|
||||
|
||||
@ -3100,7 +3100,7 @@ end
|
||||
function OPSGROUP:ClearTasks()
|
||||
local hastask=self:HasTaskController()
|
||||
if self:IsAlive() and self.controller and self:HasTaskController() then
|
||||
self:I(self.lid..string.format("CLEARING Tasks"))
|
||||
self:T(self.lid..string.format("CLEARING Tasks"))
|
||||
self.controller:resetTask()
|
||||
end
|
||||
return self
|
||||
@ -3722,7 +3722,7 @@ function OPSGROUP:onafterTaskExecute(From, Event, To, Task)
|
||||
elseif Task.type==OPSGROUP.TaskType.WAYPOINT then
|
||||
-- Waypoint tasks are executed elsewhere!
|
||||
else
|
||||
self:E(self.lid.."ERROR: Unknown task type: ")
|
||||
self:T(self.lid.."ERROR: Unknown task type: ")
|
||||
end
|
||||
|
||||
end
|
||||
@ -3802,7 +3802,7 @@ function OPSGROUP:onafterTaskCancel(From, Event, To, Task)
|
||||
else
|
||||
|
||||
local text=string.format("WARNING: No (current) task to cancel!")
|
||||
self:E(self.lid..text)
|
||||
self:T(self.lid..text)
|
||||
|
||||
end
|
||||
|
||||
@ -4319,7 +4319,7 @@ function OPSGROUP:onafterUnpauseMission(From, Event, To)
|
||||
|
||||
self.missionpaused=nil
|
||||
else
|
||||
self:E(self.lid.."ERROR: No mission to unpause!")
|
||||
self:T(self.lid.."ERROR: No mission to unpause!")
|
||||
end
|
||||
|
||||
end
|
||||
@ -5300,7 +5300,7 @@ function OPSGROUP:onbeforeLaserOn(From, Event, To, Target)
|
||||
|
||||
else
|
||||
-- No target specified.
|
||||
self:E(self.lid.."ERROR: No target provided for LASER!")
|
||||
self:T(self.lid.."ERROR: No target provided for LASER!")
|
||||
return false
|
||||
end
|
||||
|
||||
@ -5327,7 +5327,7 @@ function OPSGROUP:onbeforeLaserOn(From, Event, To, Target)
|
||||
-- Check LOS.
|
||||
local los=self:HasLoS(self.spot.Coordinate, self.spot.element, self.spot.offset)
|
||||
|
||||
--self:I({los=los, coord=self.spot.Coordinate, offset=self.spot.offset})
|
||||
--self:T({los=los, coord=self.spot.Coordinate, offset=self.spot.offset})
|
||||
|
||||
if los then
|
||||
self:LaserGotLOS()
|
||||
@ -5341,7 +5341,7 @@ function OPSGROUP:onbeforeLaserOn(From, Event, To, Target)
|
||||
end
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: No element alive for lasing")
|
||||
self:T(self.lid.."ERROR: No element alive for lasing")
|
||||
return false
|
||||
end
|
||||
|
||||
@ -5608,7 +5608,7 @@ function OPSGROUP:SetLaserTarget(Target)
|
||||
end
|
||||
|
||||
else
|
||||
self:E("WARNING: LASER target is not alive!")
|
||||
self:T("WARNING: LASER target is not alive!")
|
||||
return
|
||||
end
|
||||
|
||||
@ -5619,7 +5619,7 @@ function OPSGROUP:SetLaserTarget(Target)
|
||||
self.spot.offsetTarget={x=0, y=0, z=0}
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: LASER target should be a POSITIONABLE (GROUP, UNIT or STATIC) or a COORDINATE object!")
|
||||
self:T(self.lid.."ERROR: LASER target should be a POSITIONABLE (GROUP, UNIT or STATIC) or a COORDINATE object!")
|
||||
return
|
||||
end
|
||||
|
||||
@ -5712,7 +5712,7 @@ function OPSGROUP:_UpdateLaser()
|
||||
if los then
|
||||
-- Got LOS
|
||||
if self.spot.lostLOS then
|
||||
--self:I({los=self.spot.LOS, coord=self.spot.Coordinate, offset=self.spot.offset})
|
||||
--self:T({los=self.spot.LOS, coord=self.spot.Coordinate, offset=self.spot.offset})
|
||||
self:LaserGotLOS()
|
||||
end
|
||||
|
||||
@ -5877,7 +5877,7 @@ end
|
||||
function OPSGROUP:onafterRespawn(From, Event, To, Template)
|
||||
|
||||
-- Debug info.
|
||||
self:I(self.lid.."Respawning group!")
|
||||
self:T(self.lid.."Respawning group!")
|
||||
|
||||
-- Copy template.
|
||||
local template=UTILS.DeepCopy(Template or self.template)
|
||||
@ -6147,7 +6147,7 @@ function OPSGROUP:onbeforeStop(From, Event, To)
|
||||
|
||||
-- We check if
|
||||
if self:IsAlive() then
|
||||
self:E(self.lid..string.format("WARNING: Group is still alive! Will not stop the FSM. Use :Despawn() instead"))
|
||||
self:T(self.lid..string.format("WARNING: Group is still alive! Will not stop the FSM. Use :Despawn() instead"))
|
||||
return false
|
||||
end
|
||||
|
||||
@ -6204,7 +6204,7 @@ function OPSGROUP:onafterStop(From, Event, To)
|
||||
local life, life0=self:GetLifePoints()
|
||||
local state=self:GetState()
|
||||
local text=string.format("WARNING: Group is still alive! Current state=%s. Life points=%d/%d. Use OPSGROUP:Destroy() or OPSGROUP:Despawn() for a clean stop", state, life, life0)
|
||||
self:E(self.lid..text)
|
||||
self:T(self.lid..text)
|
||||
end
|
||||
|
||||
-- Remove flight from data base.
|
||||
@ -6248,7 +6248,7 @@ function OPSGROUP:_CheckCargoTransport()
|
||||
if text=="" then
|
||||
text=" empty"
|
||||
end
|
||||
self:I(self.lid.."Cargo bay:"..text)
|
||||
self:T(self.lid.."Cargo bay:"..text)
|
||||
end
|
||||
|
||||
-- Cargo queue debug info.
|
||||
@ -6273,7 +6273,7 @@ function OPSGROUP:_CheckCargoTransport()
|
||||
end
|
||||
end
|
||||
if text~="" then
|
||||
self:I(self.lid.."Cargo queue:"..text)
|
||||
self:T(self.lid.."Cargo queue:"..text)
|
||||
end
|
||||
end
|
||||
|
||||
@ -6588,7 +6588,7 @@ function OPSGROUP:_DelCargobay(CargoGroup)
|
||||
return true
|
||||
end
|
||||
|
||||
self:E(self.lid.."ERROR: Group is not in cargo bay. Cannot remove it!")
|
||||
self:T(self.lid.."ERROR: Group is not in cargo bay. Cannot remove it!")
|
||||
return false
|
||||
end
|
||||
|
||||
@ -6927,7 +6927,7 @@ function OPSGROUP:GetWeightCargo(UnitName, IncludeReserved)
|
||||
|
||||
-- Quick check.
|
||||
if IncludeReserved==false and gewicht~=weight then
|
||||
self:E(self.lid..string.format("ERROR: FF weight!=gewicht: weight=%.1f, gewicht=%.1f", weight, gewicht))
|
||||
self:T(self.lid..string.format("ERROR: FF weight!=gewicht: weight=%.1f, gewicht=%.1f", weight, gewicht))
|
||||
end
|
||||
|
||||
return gewicht
|
||||
@ -7261,7 +7261,7 @@ function OPSGROUP:onafterPickup(From, Event, To)
|
||||
local waypoint=FLIGHTGROUP.AddWaypoint(self, Coordinate, nil, uid, UTILS.MetersToFeet(self.altitudeCruise), false) ; waypoint.detour=1
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Transportcarrier aircraft cannot land in Pickup zone! Specify a ZONE_AIRBASE as pickup zone")
|
||||
self:T(self.lid.."ERROR: Transportcarrier aircraft cannot land in Pickup zone! Specify a ZONE_AIRBASE as pickup zone")
|
||||
end
|
||||
|
||||
-- Cancel landedAt task. This should trigger Cruise once airborne.
|
||||
@ -7270,7 +7270,7 @@ function OPSGROUP:onafterPickup(From, Event, To)
|
||||
if Task then
|
||||
self:TaskCancel(Task)
|
||||
else
|
||||
self:E(self.lid.."ERROR: No current task but landed at?!")
|
||||
self:T(self.lid.."ERROR: No current task but landed at?!")
|
||||
end
|
||||
end
|
||||
|
||||
@ -7501,7 +7501,7 @@ function OPSGROUP:onafterLoad(From, Event, To, CargoGroup, Carrier)
|
||||
end
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Cargo has no carrier on Load event!")
|
||||
self:T(self.lid.."ERROR: Cargo has no carrier on Load event!")
|
||||
end
|
||||
|
||||
end
|
||||
@ -7655,7 +7655,7 @@ function OPSGROUP:onafterTransport(From, Event, To)
|
||||
local waypoint=FLIGHTGROUP.AddWaypoint(self, Coordinate, nil, self:GetWaypointCurrent().uid, UTILS.MetersToFeet(self.altitudeCruise), false) ; waypoint.detour=1
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Aircraft (cargo carrier) cannot land in Deploy zone! Specify a ZONE_AIRBASE as deploy zone")
|
||||
self:T(self.lid.."ERROR: Aircraft (cargo carrier) cannot land in Deploy zone! Specify a ZONE_AIRBASE as deploy zone")
|
||||
end
|
||||
|
||||
-- Cancel landedAt task. This should trigger Cruise once airborne.
|
||||
@ -7664,7 +7664,7 @@ function OPSGROUP:onafterTransport(From, Event, To)
|
||||
if Task then
|
||||
self:TaskCancel(Task)
|
||||
else
|
||||
self:E(self.lid.."ERROR: No current task but landed at?!")
|
||||
self:T(self.lid.."ERROR: No current task but landed at?!")
|
||||
end
|
||||
end
|
||||
|
||||
@ -7792,7 +7792,7 @@ function OPSGROUP:onafterUnloading(From, Event, To)
|
||||
---
|
||||
|
||||
-- Issue warning.
|
||||
self:E(self.lid.."ERROR: Deploy/disembark zone is a ZONE_AIRBASE of a ship! Where to put the cargo? Dumping into the sea, sorry!")
|
||||
self:T(self.lid.."ERROR: Deploy/disembark zone is a ZONE_AIRBASE of a ship! Where to put the cargo? Dumping into the sea, sorry!")
|
||||
|
||||
-- Unload but keep "in utero" (no coordinate provided).
|
||||
self:Unload(cargo.opsgroup)
|
||||
@ -7991,7 +7991,7 @@ end
|
||||
-- @param #string To To state.
|
||||
-- @param #OPSGROUP OpsGroupCargo Cargo OPSGROUP that was unloaded from a carrier.
|
||||
function OPSGROUP:onafterUnloaded(From, Event, To, OpsGroupCargo)
|
||||
self:I(self.lid..string.format("Unloaded OPSGROUP %s", OpsGroupCargo:GetName()))
|
||||
self:T(self.lid..string.format("Unloaded OPSGROUP %s", OpsGroupCargo:GetName()))
|
||||
end
|
||||
|
||||
|
||||
@ -8022,13 +8022,13 @@ function OPSGROUP:onafterUnloadingDone(From, Event, To)
|
||||
if self.cargoTZC then
|
||||
|
||||
-- Pickup the next batch.
|
||||
self:I(self.lid.."Unloaded: Still cargo left ==> Pickup")
|
||||
self:T(self.lid.."Unloaded: Still cargo left ==> Pickup")
|
||||
self:Pickup()
|
||||
|
||||
else
|
||||
|
||||
-- Debug info.
|
||||
self:I(self.lid..string.format("WARNING: Not all cargo was delivered but could not get a transport zone combo ==> setting carrier state to NOT CARRIER"))
|
||||
self:T(self.lid..string.format("WARNING: Not all cargo was delivered but could not get a transport zone combo ==> setting carrier state to NOT CARRIER"))
|
||||
|
||||
-- This is not a carrier anymore.
|
||||
self:_NewCarrierStatus(OPSGROUP.CarrierStatus.NOTCARRIER)
|
||||
@ -8038,7 +8038,7 @@ function OPSGROUP:onafterUnloadingDone(From, Event, To)
|
||||
else
|
||||
|
||||
-- Everything delivered.
|
||||
self:I(self.lid.."Unloaded: ALL cargo unloaded ==> Delivered (current)")
|
||||
self:T(self.lid.."Unloaded: ALL cargo unloaded ==> Delivered (current)")
|
||||
self:Delivered(self.cargoTransport)
|
||||
|
||||
end
|
||||
@ -8238,14 +8238,14 @@ end
|
||||
function OPSGROUP:onbeforeBoard(From, Event, To, CarrierGroup, Carrier)
|
||||
|
||||
if self:IsDead() then
|
||||
self:I(self.lid.."Group DEAD ==> Deny Board transition!")
|
||||
self:T(self.lid.."Group DEAD ==> Deny Board transition!")
|
||||
return false
|
||||
elseif CarrierGroup:IsDead() then
|
||||
self:I(self.lid.."Carrier Group DEAD ==> Deny Board transition!")
|
||||
self:T(self.lid.."Carrier Group DEAD ==> Deny Board transition!")
|
||||
self:_NewCargoStatus(OPSGROUP.CargoStatus.NOTCARGO)
|
||||
return false
|
||||
elseif Carrier.status==OPSGROUP.ElementStatus.DEAD then
|
||||
self:I(self.lid.."Carrier Element DEAD ==> Deny Board transition!")
|
||||
self:T(self.lid.."Carrier Element DEAD ==> Deny Board transition!")
|
||||
self:_NewCargoStatus(OPSGROUP.CargoStatus.NOTCARGO)
|
||||
return false
|
||||
end
|
||||
@ -8591,7 +8591,7 @@ function OPSGROUP:_CheckGroupDone(delay)
|
||||
self:T(self.lid..string.format("Adinfinitum=TRUE ==> Goto WP index=%d at speed=%d knots", i, speed))
|
||||
|
||||
else
|
||||
self:E(self.lid..string.format("WARNING: No waypoints left! Commanding a Full Stop"))
|
||||
self:T(self.lid..string.format("WARNING: No waypoints left! Commanding a Full Stop"))
|
||||
self:__FullStop(-1)
|
||||
end
|
||||
|
||||
@ -8631,7 +8631,7 @@ function OPSGROUP:_CheckGroupDone(delay)
|
||||
self:T(self.lid..string.format("NOT Passed final WP, #WP>0 ==> Update Route"))
|
||||
self:Cruise()
|
||||
else
|
||||
self:E(self.lid..string.format("WARNING: No waypoints left! Commanding a Full Stop"))
|
||||
self:T(self.lid..string.format("WARNING: No waypoints left! Commanding a Full Stop"))
|
||||
self:__FullStop(-1)
|
||||
end
|
||||
|
||||
@ -8685,7 +8685,7 @@ function OPSGROUP:_CheckStuck()
|
||||
if holdtime>=5*60 and holdtime<10*60 then
|
||||
|
||||
-- Debug warning.
|
||||
self:E(self.lid..string.format("WARNING: Group came to an unexpected standstill. Speed=%.1f<%.1f m/s expected for %d sec", speed, ExpectedSpeed, holdtime))
|
||||
self:T(self.lid..string.format("WARNING: Group came to an unexpected standstill. Speed=%.1f<%.1f m/s expected for %d sec", speed, ExpectedSpeed, holdtime))
|
||||
|
||||
-- Give cruise command again.
|
||||
if self:IsReturning() then
|
||||
@ -8697,14 +8697,14 @@ function OPSGROUP:_CheckStuck()
|
||||
elseif holdtime>=10*60 and holdtime<30*60 then
|
||||
|
||||
-- Debug warning.
|
||||
self:E(self.lid..string.format("WARNING: Group came to an unexpected standstill. Speed=%.1f<%.1f m/s expected for %d sec", speed, ExpectedSpeed, holdtime))
|
||||
self:T(self.lid..string.format("WARNING: Group came to an unexpected standstill. Speed=%.1f<%.1f m/s expected for %d sec", speed, ExpectedSpeed, holdtime))
|
||||
|
||||
--TODO: Stuck event!
|
||||
|
||||
-- Look for a current mission and cancel it as we do not seem to be able to perform it.
|
||||
local mission=self:GetMissionCurrent()
|
||||
if mission then
|
||||
self:E(self.lid..string.format("WARNING: Cancelling mission %s [%s] due to being stuck", mission:GetName(), mission:GetType()))
|
||||
self:T(self.lid..string.format("WARNING: Cancelling mission %s [%s] due to being stuck", mission:GetName(), mission:GetType()))
|
||||
self:MissionCancel(mission)
|
||||
else
|
||||
-- Give cruise command again.
|
||||
@ -8718,7 +8718,7 @@ function OPSGROUP:_CheckStuck()
|
||||
elseif holdtime>=30*60 then
|
||||
|
||||
-- Debug warning.
|
||||
self:E(self.lid..string.format("WARNING: Group came to an unexpected standstill. Speed=%.1f<%.1f m/s expected for %d sec", speed, ExpectedSpeed, holdtime))
|
||||
self:T(self.lid..string.format("WARNING: Group came to an unexpected standstill. Speed=%.1f<%.1f m/s expected for %d sec", speed, ExpectedSpeed, holdtime))
|
||||
|
||||
end
|
||||
|
||||
@ -9136,7 +9136,7 @@ function OPSGROUP:_InitWaypoints(WpIndexMin, WpIndexMax)
|
||||
end
|
||||
|
||||
else
|
||||
self:E(self.lid.."WARNING: No waypoints initialized. Number of waypoints is 0!")
|
||||
self:T(self.lid.."WARNING: No waypoints initialized. Number of waypoints is 0!")
|
||||
end
|
||||
|
||||
return self
|
||||
@ -9171,7 +9171,7 @@ function OPSGROUP:Route(waypoints, delay)
|
||||
self:SetTask(DCSTask)
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Group is not alive! Cannot route group.")
|
||||
self:T(self.lid.."ERROR: Group is not alive! Cannot route group.")
|
||||
end
|
||||
end
|
||||
|
||||
@ -9509,7 +9509,7 @@ function OPSGROUP:SwitchROE(roe)
|
||||
|
||||
|
||||
else
|
||||
self:E(self.lid.."WARNING: Cannot switch ROE! Group is not alive")
|
||||
self:T(self.lid.."WARNING: Cannot switch ROE! Group is not alive")
|
||||
end
|
||||
|
||||
return self
|
||||
@ -9574,7 +9574,7 @@ function OPSGROUP:SwitchROT(rot)
|
||||
|
||||
|
||||
else
|
||||
self:E(self.lid.."WARNING: Cannot switch ROT! Group is not alive")
|
||||
self:T(self.lid.."WARNING: Cannot switch ROT! Group is not alive")
|
||||
end
|
||||
|
||||
end
|
||||
@ -9627,7 +9627,7 @@ function OPSGROUP:SwitchAlarmstate(alarmstate)
|
||||
elseif self.option.Alarm==2 then
|
||||
self.group:OptionAlarmStateRed()
|
||||
else
|
||||
self:E("ERROR: Unknown Alarm State! Setting to AUTO")
|
||||
self:T("ERROR: Unknown Alarm State! Setting to AUTO")
|
||||
self.group:OptionAlarmStateAuto()
|
||||
self.option.Alarm=0
|
||||
end
|
||||
@ -9638,7 +9638,7 @@ function OPSGROUP:SwitchAlarmstate(alarmstate)
|
||||
|
||||
end
|
||||
else
|
||||
self:E(self.lid.."WARNING: Cannot switch Alarm State! Group is not alive.")
|
||||
self:T(self.lid.."WARNING: Cannot switch Alarm State! Group is not alive.")
|
||||
end
|
||||
|
||||
return self
|
||||
@ -9693,7 +9693,7 @@ function OPSGROUP:SwitchEPLRS(OnOffSwitch)
|
||||
|
||||
end
|
||||
else
|
||||
self:E(self.lid.."WARNING: Cannot switch Alarm State! Group is not alive")
|
||||
self:T(self.lid.."WARNING: Cannot switch Alarm State! Group is not alive")
|
||||
end
|
||||
|
||||
return self
|
||||
@ -9832,11 +9832,11 @@ function OPSGROUP:SwitchTACAN(Channel, Morse, UnitName, Band)
|
||||
self:T(self.lid..string.format("Switching TACAN to Channel %d%s Morse %s on unit %s", self.tacan.Channel, self.tacan.Band, tostring(self.tacan.Morse), self.tacan.BeaconName))
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Cound not set TACAN! Unit is not alive")
|
||||
self:T(self.lid.."ERROR: Cound not set TACAN! Unit is not alive")
|
||||
end
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Cound not set TACAN! Group is not alive and not in utero any more")
|
||||
self:T(self.lid.."ERROR: Cound not set TACAN! Group is not alive and not in utero any more")
|
||||
end
|
||||
|
||||
return self
|
||||
@ -9974,7 +9974,7 @@ function OPSGROUP:SwitchICLS(Channel, Morse, UnitName)
|
||||
self:T(self.lid..string.format("Switching ICLS to Channel %d Morse %s on unit %s", self.icls.Channel, tostring(self.icls.Morse), self.icls.BeaconName))
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Cound not set ICLS! Unit is not alive.")
|
||||
self:T(self.lid.."ERROR: Cound not set ICLS! Unit is not alive.")
|
||||
end
|
||||
|
||||
end
|
||||
@ -10063,7 +10063,7 @@ function OPSGROUP:SwitchRadio(Frequency, Modulation)
|
||||
self:T(self.lid..string.format("Switching radio to frequency %.3f MHz %s", self.radio.Freq, UTILS.GetModulationName(self.radio.Modu)))
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Cound not set Radio! Group is not alive or not in utero any more")
|
||||
self:T(self.lid.."ERROR: Cound not set Radio! Group is not alive or not in utero any more")
|
||||
end
|
||||
|
||||
return self
|
||||
@ -10086,7 +10086,7 @@ function OPSGROUP:TurnOffRadio()
|
||||
|
||||
self:T(self.lid..string.format("Switching radio OFF"))
|
||||
else
|
||||
self:E(self.lid.."ERROR: Radio can only be turned off for aircraft!")
|
||||
self:T(self.lid.."ERROR: Radio can only be turned off for aircraft!")
|
||||
end
|
||||
|
||||
end
|
||||
@ -10126,7 +10126,7 @@ function OPSGROUP:SwitchFormation(Formation)
|
||||
-- Polymorphic and overwritten in ARMYGROUP.
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Formation can only be set for aircraft or ground units!")
|
||||
self:T(self.lid.."ERROR: Formation can only be set for aircraft or ground units!")
|
||||
return self
|
||||
end
|
||||
|
||||
@ -10199,7 +10199,7 @@ function OPSGROUP:SwitchCallsign(CallsignName, CallsignNumber)
|
||||
end
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: Group is not alive and not in utero! Cannot switch callsign")
|
||||
self:T(self.lid.."ERROR: Group is not alive and not in utero! Cannot switch callsign")
|
||||
end
|
||||
|
||||
return self
|
||||
@ -11045,11 +11045,11 @@ function OPSGROUP:_CoordinateFromObject(Object)
|
||||
local coord=Object:GetCoordinate()
|
||||
return coord
|
||||
else
|
||||
self:E(self.lid.."ERROR: Coordinate is neither a COORDINATE nor any POSITIONABLE or ZONE!")
|
||||
self:T(self.lid.."ERROR: Coordinate is neither a COORDINATE nor any POSITIONABLE or ZONE!")
|
||||
end
|
||||
end
|
||||
else
|
||||
self:E(self.lid.."ERROR: Object passed is nil!")
|
||||
self:T(self.lid.."ERROR: Object passed is nil!")
|
||||
end
|
||||
|
||||
return nil
|
||||
@ -11269,7 +11269,7 @@ function OPSGROUP:_GetTemplate(Copy)
|
||||
end
|
||||
|
||||
else
|
||||
self:E(self.lid..string.format("ERROR: No template was set yet!"))
|
||||
self:T(self.lid..string.format("ERROR: No template was set yet!"))
|
||||
end
|
||||
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user