Beacon - added deactivate Link4

This commit is contained in:
Applevangelist 2022-07-19 08:29:43 +02:00
parent 4ae586ebaa
commit eef8b362d2
2 changed files with 23 additions and 4 deletions

View File

@ -265,12 +265,13 @@ function BEACON:ActivateLink4(Frequency, Morse, Duration)
-- Stop sheduler -- Stop sheduler
if Duration then -- Schedule the stop of the BEACON if asked by the MD if Duration then -- Schedule the stop of the BEACON if asked by the MD
self.Positionable:DeactivateBeacon(Duration) self.Positionable:DeactivateLink4(Duration)
end end
return self return self
end end
--- DEPRECATED: Please use @{BEACON:ActivateTACAN}() instead. --- DEPRECATED: Please use @{BEACON:ActivateTACAN}() instead.
-- Activates a TACAN BEACON on an Aircraft. -- Activates a TACAN BEACON on an Aircraft.
-- @param #BEACON self -- @param #BEACON self

View File

@ -700,9 +700,9 @@ end
--- Activate LINK4 system of the CONTROLLABLE. The controllable should be an aircraft carrier! --- Activate LINK4 system of the CONTROLLABLE. The controllable should be an aircraft carrier!
-- @param #CONTROLLABLE self -- @param #CONTROLLABLE self
-- @param #number Frequency Link4 Frequency in MHz, e.g. 336 -- @param #number Frequency Link4 Frequency in MHz, e.g. 336
-- @param #number UnitID The ID of the unit the ICLS system is attached to. Useful if more units are in one group. -- @param #number UnitID The DCS UNIT ID of the unit the LINK4 system is attached to. Useful if more units are in one group.
-- @param #string Callsign Morse code identification callsign. -- @param #string Callsign Morse code identification callsign.
-- @param #number Delay (Optional) Delay in seconds before the ICLS is deactivated. -- @param #number Delay (Optional) Delay in seconds before the LINK4 is deactivated.
-- @return #CONTROLLABLE self -- @return #CONTROLLABLE self
function CONTROLLABLE:CommandActivateLink4(Frequency, UnitID, Callsign, Delay) function CONTROLLABLE:CommandActivateLink4(Frequency, UnitID, Callsign, Delay)
@ -735,7 +735,7 @@ function CONTROLLABLE:CommandDeactivateBeacon( Delay )
local CommandDeactivateBeacon = { id = 'DeactivateBeacon', params = {} } local CommandDeactivateBeacon = { id = 'DeactivateBeacon', params = {} }
if Delay and Delay > 0 then if Delay and Delay > 0 then
SCHEDULER:New( nil, self.CommandActivateBeacon, { self }, Delay ) SCHEDULER:New( nil, self.CommandDeactivateBeacon, { self }, Delay )
else else
self:SetCommand( CommandDeactivateBeacon ) self:SetCommand( CommandDeactivateBeacon )
end end
@ -761,6 +761,24 @@ function CONTROLLABLE:CommandDeactivateICLS( Delay )
return self return self
end end
--- Deactivate the active Link4 of the CONTROLLABLE.
-- @param #CONTROLLABLE self
-- @param #number Delay (Optional) Delay in seconds before the Link4 is deactivated.
-- @return #CONTROLLABLE self
function CONTROLLABLE:CommandDeactivateLink4(Delay)
-- Command to deactivate
local CommandDeactivateLink4={id='DeactivateLink4', params={}}
if Delay and Delay>0 then
SCHEDULER:New(nil, self.CommandDeactivateLink4, {self}, Delay)
else
self:SetCommand(CommandDeactivateLink4)
end
return self
end
--- Set callsign of the CONTROLLABLE. See [DCS command setCallsign](https://wiki.hoggitworld.com/view/DCS_command_setCallsign) --- Set callsign of the CONTROLLABLE. See [DCS command setCallsign](https://wiki.hoggitworld.com/view/DCS_command_setCallsign)
-- @param #CONTROLLABLE self -- @param #CONTROLLABLE self
-- @param DCS#CALLSIGN CallName Number corresponding the the callsign identifier you wish this group to be called. -- @param DCS#CALLSIGN CallName Number corresponding the the callsign identifier you wish this group to be called.