mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Implement POSITIONABLE:GetRadio() and small fixes in Radio.lua
This commit is contained in:
@@ -33,12 +33,11 @@ MESSAGE = {
|
|||||||
-- @TODO Manage Trace in all functions below
|
-- @TODO Manage Trace in all functions below
|
||||||
|
|
||||||
--- Create a new RADIO Object. This doesn't broadcast a transmission, though, use @{Radio#RADIO.Broadcast} to actually broadcast
|
--- Create a new RADIO Object. This doesn't broadcast a transmission, though, use @{Radio#RADIO.Broadcast} to actually broadcast
|
||||||
-- @param self
|
|
||||||
-- @param #POSITIONABLE Positionable
|
-- @param #POSITIONABLE Positionable
|
||||||
-- @return self
|
-- @return self
|
||||||
-- @usage
|
-- @usage
|
||||||
-- -- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio}
|
-- -- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio}
|
||||||
function RADIO:New(positionable)
|
function RADIO.New(positionable)
|
||||||
local self = BASE:Inherit( self, BASE:New() )
|
local self = BASE:Inherit( self, BASE:New() )
|
||||||
-- self:F( { MessageText, MessageDuration, MessageCategory } )
|
-- self:F( { MessageText, MessageDuration, MessageCategory } )
|
||||||
|
|
||||||
|
|||||||
@@ -432,7 +432,11 @@ function POSITIONABLE:Message( Message, Duration, Name )
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Create a @{Radio#RADIO}, to allow radio transmission for this POSITIONABLE
|
||||||
|
-- Set parameters with the methods provided, then use @{Radio#RADIO.Broadcast} to actually broadcast the message
|
||||||
|
-- @param self
|
||||||
|
-- @return #RADIO
|
||||||
|
function POSITIONABLE:GetRadio()
|
||||||
|
local Radio = RADIO.New(self)
|
||||||
|
return Radio
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user