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)
|
||||
self:F(power)
|
||||
if type(power) == "number" then
|
||||
if math.floor(math.abs(power)) == power then
|
||||
self.Power = power --TODO Find what is the maximum power allowed by DCS and limit power to that
|
||||
return self
|
||||
end
|
||||
self.Power = math.floor(math.abs(power)) --TODO Find what is the maximum power allowed by DCS and limit power to that
|
||||
return self
|
||||
end
|
||||
self:E({"Power is invalid. Power unchanged.", self.Power})
|
||||
return self
|
||||
@ -169,6 +167,7 @@ function RADIO:SetSubtitle(subtitle, subtitleDuration)
|
||||
self.SubtitleDuration = 0
|
||||
self:E({"SubtitleDuration is invalid. SubtitleDuration reset.", self.SubtitleDuration})
|
||||
end
|
||||
|
||||
--- Create a new transmission, that is to say, populate the RADIO with relevant data
|
||||
-- @param self
|
||||
-- @param #string Filename
|
||||
|
||||
@ -10,13 +10,7 @@ local Static = STATIC:FindByName("CommandCenter")
|
||||
local Transmiter = UNIT:FindByName("Transmiter")
|
||||
|
||||
local Radio = Transmiter:GetRadio()
|
||||
Radio:SetFrequency(25)
|
||||
Radio:SetFrequency(89)
|
||||
Radio:SetFrequency(152)
|
||||
Radio:SetFrequency(500)
|
||||
Radio:SetFrequency("a")
|
||||
Radio:SetFrequency(225)
|
||||
Radio:SetFrequency(251.3)
|
||||
|
||||
Radio:SetSubtitle(6, "tes")
|
||||
Radio:SetFileName("Noise.ogg")
|
||||
Radio:SetFrequency(251.3)
|
||||
Radio:Broadcast()
|
||||
Loading…
x
Reference in New Issue
Block a user