mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Implement RADIO:NewGenericTransmission() and RADIO:NewUnitTransmission()
This commit is contained in:
parent
4b45476105
commit
4df4223373
@ -50,7 +50,7 @@ end
|
|||||||
|
|
||||||
--- Check validity of the filename passed and sets RADIO.FileName
|
--- Check validity of the filename passed and sets RADIO.FileName
|
||||||
-- @param #RADIO self
|
-- @param #RADIO self
|
||||||
-- @param #string fileName Filename of the sound
|
-- @param #string fileName of the sound
|
||||||
-- @return self
|
-- @return self
|
||||||
-- @usage
|
-- @usage
|
||||||
function RADIO:SetFileName(filename)
|
function RADIO:SetFileName(filename)
|
||||||
@ -171,7 +171,7 @@ end
|
|||||||
--- Create a new transmission, that is to say, populate the RADIO with relevant data
|
--- Create a new transmission, that is to say, populate the RADIO with relevant data
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #string Filename
|
-- @param #string Filename
|
||||||
-- @param #number Frequency in kHz
|
-- @param #number Frequency in MHz
|
||||||
-- @param #number Modulation
|
-- @param #number Modulation
|
||||||
-- @param #number Power in W
|
-- @param #number Power in W
|
||||||
-- @return self
|
-- @return self
|
||||||
@ -181,7 +181,12 @@ end
|
|||||||
-- -- Only the RADIO and the Filename are mandatory
|
-- -- Only the RADIO and the Filename are mandatory
|
||||||
function RADIO:NewGenericTransmission(...)
|
function RADIO:NewGenericTransmission(...)
|
||||||
self:F(arg)
|
self:F(arg)
|
||||||
|
|
||||||
|
self:SetFileName(arg[1])
|
||||||
|
if arg[2] then self:SetFrequency(arg[2]) end
|
||||||
|
if arg[3] then self:SetModualtion(arg[3]) end
|
||||||
|
if arg[4] then self:SetPower(arg[4]) end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -204,6 +209,13 @@ end
|
|||||||
function RADIO:NewUnitTransmission(...)
|
function RADIO:NewUnitTransmission(...)
|
||||||
self:F(arg)
|
self:F(arg)
|
||||||
|
|
||||||
|
self:SetFileName(arg[1])
|
||||||
|
if arg[2] then self:SetSubtitle(arg[2]) end
|
||||||
|
if arg[3] then self:SetSubtitleDuration(arg[3]) end
|
||||||
|
if arg[4] then self:SetFrequency(arg[4]) end
|
||||||
|
if arg[5] then self:SetModualtion(arg[5]) end
|
||||||
|
if arg[6] then self:SetLoop(arg[6]) end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user