From 94ad317e61c4698c0c0ea19690ccde02a67265c1 Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Thu, 20 Apr 2017 12:10:36 +0200 Subject: [PATCH] Small bufixes to BEACON --- Moose Development/Moose/Core/Radio.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 6c95fcdc2..0f11af9b1 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -493,6 +493,7 @@ end -- @param #number BeaconDuration How long will the beacon last in seconds. Omit for forever. -- @return #BEACON self function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration) + self:F({FileName, Frequency, Modulation, Power, BeaconDuration}) local IsValid = false -- Check the filename @@ -502,7 +503,6 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati FileName = "l10n/DEFAULT/" .. FileName end IsValid = true - return self end end if not IsValid then @@ -514,6 +514,7 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati self:E({"Frequency invalid. ", Frequency}) IsValid = false end + Frequency = Frequency * 1000000 -- Conversion to Hz -- Check the modulation if Modulation ~= radio.modulation.AM and Modulation ~= radio.modulation.FM and IsValid then --TODO Maybe make this future proof if ED decides to add an other modulation ? @@ -546,6 +547,7 @@ end -- @param #BEACON self -- @return #BEACON self function BEACON:StopRadioBeacon() + self:F() -- The unique name of the transmission is the class ID trigger.action.stopRadioTransmission(tostring(self.ID)) end \ No newline at end of file