- Clean up tracing
This commit is contained in:
Frank
2021-11-14 22:12:41 +01:00
parent b9b5938a91
commit d62bb59df7
5 changed files with 18 additions and 15 deletions

View File

@@ -1516,6 +1516,7 @@ function AUFTRAG:NewTROOPTRANSPORT(TransportGroupSet, DropoffCoordinate, PickupC
return mission return mission
end end
--[[
--- **[AIR, GROUND, NAVAL]** Create a OPS TRANSPORT mission. --- **[AIR, GROUND, NAVAL]** Create a OPS TRANSPORT mission.
-- @param #AUFTRAG self -- @param #AUFTRAG self
@@ -1552,6 +1553,7 @@ function AUFTRAG:NewOPSTRANSPORT(CargoGroupSet, PickupZone, DeployZone)
return mission return mission
end end
]]
--- **[GROUND, NAVAL]** Create an ARTY mission. --- **[GROUND, NAVAL]** Create an ARTY mission.
-- @param #AUFTRAG self -- @param #AUFTRAG self

View File

@@ -41,8 +41,9 @@
-- --
-- # Constructor -- # Constructor
-- --
-- A new CHIEF object is created with the @{#CHIEF.New}(*Coalition, Alias*) function, where the parameter *Coalition* is the coalition side. -- A new COMMANDER object is created with the @{#COMMANDER.New}(*Coalition, Alias*) function, where the parameter *Coalition* is the coalition side.
-- It can be `coalition.side.RED`, `coalition.side.BLUE` or `coalition.side.NEUTRAL`. This parameter is mandatory. -- It can be `coalition.side.RED`, `coalition.side.BLUE` or `coalition.side.NEUTRAL`. This parameter is mandatory!
--
-- The second parameter *Alias* is optional and can be used to give the COMMANDER a "name", which is used for output in the dcs.log file. -- The second parameter *Alias* is optional and can be used to give the COMMANDER a "name", which is used for output in the dcs.log file.
-- --
-- local myCommander=COMANDER:New(coalition.side.BLUE, "General Patton") -- local myCommander=COMANDER:New(coalition.side.BLUE, "General Patton")

View File

@@ -1610,13 +1610,13 @@ function OPSGROUP:Despawn(Delay, NoEventRemoveUnit)
if self.legion and not NoEventRemoveUnit then if self.legion and not NoEventRemoveUnit then
-- Add asset back in 10 seconds. -- Add asset back in 10 seconds.
self:I(self.lid..string.format("Despawning Group by adding asset to LEGION!")) self:T(self.lid..string.format("Despawning Group by adding asset to LEGION!"))
self.legion:AddAsset(self.group, 1) self.legion:AddAsset(self.group, 1)
return return
end end
-- Debug info. -- Debug info.
self:I(self.lid..string.format("Despawning Group!")) self:T(self.lid..string.format("Despawning Group!"))
-- DCS group obejct. -- DCS group obejct.
local DCSGroup=self:GetDCSGroup() local DCSGroup=self:GetDCSGroup()
@@ -1822,7 +1822,7 @@ function OPSGROUP:RadioTransmission(Text, Delay)
self.msrs:SetModulations(modu) self.msrs:SetModulations(modu)
-- Debug info. -- Debug info.
self:I(self.lid..string.format("Radio transmission on %.3f MHz %s: %s", freq, UTILS.GetModulationName(modu), Text)) self:T(self.lid..string.format("Radio transmission on %.3f MHz %s: %s", freq, UTILS.GetModulationName(modu), Text))
self.msrs:PlayText(Text) self.msrs:PlayText(Text)
end end
@@ -4796,14 +4796,14 @@ function OPSGROUP:onbeforeWait(From, Event, To, Duration)
-- Check for a current task. -- Check for a current task.
if self.taskcurrent>0 then if self.taskcurrent>0 then
self:I(self.lid..string.format("WARNING: Got current task ==> WAIT event is suspended for 30 sec!")) self:T(self.lid..string.format("WARNING: Got current task ==> WAIT event is suspended for 30 sec!"))
Tsuspend=-30 Tsuspend=-30
allowed=false allowed=false
end end
-- Check for a current transport assignment. -- Check for a current transport assignment.
if self.cargoTransport then if self.cargoTransport then
self:I(self.lid..string.format("WARNING: Got current TRANSPORT assignment ==> WAIT event is suspended for 30 sec!")) self:T(self.lid..string.format("WARNING: Got current TRANSPORT assignment ==> WAIT event is suspended for 30 sec!"))
Tsuspend=-30 Tsuspend=-30
allowed=false allowed=false
end end
@@ -5142,7 +5142,7 @@ function OPSGROUP:onafterGotoWaypoint(From, Event, To, UID, Speed)
Speed=Speed or self:GetSpeedToWaypoint(n) Speed=Speed or self:GetSpeedToWaypoint(n)
-- Debug message -- Debug message
self:I(self.lid..string.format("Goto Waypoint UID=%d index=%d from %d at speed %.1f knots", UID, n, self.currentwp, Speed)) self:T(self.lid..string.format("Goto Waypoint UID=%d index=%d from %d at speed %.1f knots", UID, n, self.currentwp, Speed))
-- Update the route. -- Update the route.
self:__UpdateRoute(0.1, n, nil, Speed) self:__UpdateRoute(0.1, n, nil, Speed)
@@ -6054,7 +6054,7 @@ end
function OPSGROUP:onafterDead(From, Event, To) function OPSGROUP:onafterDead(From, Event, To)
-- Debug info. -- Debug info.
self:I(self.lid..string.format("Group dead at t=%.3f", timer.getTime())) self:T(self.lid..string.format("Group dead at t=%.3f", timer.getTime()))
-- Is dead now. -- Is dead now.
self.isDead=true self.isDead=true
@@ -11292,7 +11292,7 @@ function OPSGROUP:_GetDetectedTarget()
local righttype=false local righttype=false
for _,attribute in pairs(self.engagedetectedTypes) do for _,attribute in pairs(self.engagedetectedTypes) do
local gotit=group:HasAttribute(attribute, false) local gotit=group:HasAttribute(attribute, false)
self:I(self.lid..string.format("Group %s has attribute %s = %s", group:GetName(), attribute, tostring(gotit))) self:T(self.lid..string.format("Group %s has attribute %s = %s", group:GetName(), attribute, tostring(gotit)))
if gotit then if gotit then
righttype=true righttype=true
break break

View File

@@ -1260,7 +1260,7 @@ function OPSTRANSPORT:SetCarrierTransportStatus(CarrierGroup, Status)
local oldstatus=self:GetCarrierTransportStatus(CarrierGroup) local oldstatus=self:GetCarrierTransportStatus(CarrierGroup)
-- Debug info. -- Debug info.
self:I(self.lid..string.format("New carrier transport status for %s: %s --> %s", CarrierGroup:GetName(), oldstatus, Status)) self:T(self.lid..string.format("New carrier transport status for %s: %s --> %s", CarrierGroup:GetName(), oldstatus, Status))
-- Set new status. -- Set new status.
self.carrierTransportStatus[CarrierGroup.groupname]=Status self.carrierTransportStatus[CarrierGroup.groupname]=Status

View File

@@ -1494,18 +1494,18 @@ do -- Cargo
-- Fuel. The descriptor provides the max fuel mass in kg. This needs to be multiplied by the relative fuel amount to calculate the actual fuel mass on board. -- Fuel. The descriptor provides the max fuel mass in kg. This needs to be multiplied by the relative fuel amount to calculate the actual fuel mass on board.
local massFuelMax=Desc.fuelMassMax or 0 local massFuelMax=Desc.fuelMassMax or 0
local relFuel=self:GetFuel() or 1.0 local relFuel=math.max(self:GetFuel() or 1.0, 1.0) -- We take 1.0 as max in case of external fuel tanks.
local massFuel=massFuelMax*relFuel local massFuel=massFuelMax*relFuel
-- Number of soldiers according to DCS function -- Number of soldiers according to DCS function
local troopcapacity=self:GetTroopCapacity() or 0 --local troopcapacity=self:GetTroopCapacity() or 0
-- Calculate max cargo weight, which is the max (takeoff) weight minus the empty weight minus the actual fuel weight. -- Calculate max cargo weight, which is the max (takeoff) weight minus the empty weight minus the actual fuel weight.
local CargoWeight=massMax-(massEmpty+massFuel) local CargoWeight=massMax-(massEmpty+massFuel)
-- Debug info. -- Debug info.
self:I(string.format("Setting Cargo bay weight limit [%s]=%d kg (Mass max=%d, empty=%d, fuelMax=%d kg (rel=%.3f), fuel=%d kg", TypeName, CargoWeight, massMax, massEmpty, massFuelMax, relFuel, massFuel)) self:T(string.format("Setting Cargo bay weight limit [%s]=%d kg (Mass max=%d, empty=%d, fuelMax=%d kg (rel=%.3f), fuel=%d kg", TypeName, CargoWeight, massMax, massEmpty, massFuelMax, relFuel, massFuel))
self:I(string.format("Descent Troop Capacity=%d ==> %d kg (for 95 kg soldier)", troopcapacity, troopcapacity*95)) --self:T(string.format("Descent Troop Capacity=%d ==> %d kg (for 95 kg soldier)", troopcapacity, troopcapacity*95))
-- Set value. -- Set value.
self.__.CargoBayWeightLimit = CargoWeight self.__.CargoBayWeightLimit = CargoWeight