mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Every RADIO Setter is tested
This commit is contained in:
parent
894ed41374
commit
4b45476105
@ -121,10 +121,8 @@ end
|
|||||||
function RADIO:SetPower(power)
|
function RADIO:SetPower(power)
|
||||||
self:F(power)
|
self:F(power)
|
||||||
if type(power) == "number" then
|
if type(power) == "number" then
|
||||||
if math.floor(math.abs(power)) == power then
|
self.Power = math.floor(math.abs(power)) --TODO Find what is the maximum power allowed by DCS and limit power to that
|
||||||
self.Power = power --TODO Find what is the maximum power allowed by DCS and limit power to that
|
return self
|
||||||
return self
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
self:E({"Power is invalid. Power unchanged.", self.Power})
|
self:E({"Power is invalid. Power unchanged.", self.Power})
|
||||||
return self
|
return self
|
||||||
@ -169,6 +167,7 @@ function RADIO:SetSubtitle(subtitle, subtitleDuration)
|
|||||||
self.SubtitleDuration = 0
|
self.SubtitleDuration = 0
|
||||||
self:E({"SubtitleDuration is invalid. SubtitleDuration reset.", self.SubtitleDuration})
|
self:E({"SubtitleDuration is invalid. SubtitleDuration reset.", self.SubtitleDuration})
|
||||||
end
|
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
|
||||||
|
|||||||
@ -10,13 +10,7 @@ local Static = STATIC:FindByName("CommandCenter")
|
|||||||
local Transmiter = UNIT:FindByName("Transmiter")
|
local Transmiter = UNIT:FindByName("Transmiter")
|
||||||
|
|
||||||
local Radio = Transmiter:GetRadio()
|
local Radio = Transmiter:GetRadio()
|
||||||
Radio:SetFrequency(25)
|
Radio:SetSubtitle(6, "tes")
|
||||||
Radio:SetFrequency(89)
|
|
||||||
Radio:SetFrequency(152)
|
|
||||||
Radio:SetFrequency(500)
|
|
||||||
Radio:SetFrequency("a")
|
|
||||||
Radio:SetFrequency(225)
|
|
||||||
Radio:SetFrequency(251.3)
|
|
||||||
|
|
||||||
Radio:SetFileName("Noise.ogg")
|
Radio:SetFileName("Noise.ogg")
|
||||||
|
Radio:SetFrequency(251.3)
|
||||||
Radio:Broadcast()
|
Radio:Broadcast()
|
||||||
Loading…
x
Reference in New Issue
Block a user