mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/master' into develop
# Conflicts: # Moose Development/Moose/Sound/SRS.lua
This commit is contained in:
commit
e53a80783e
@ -480,7 +480,7 @@ _MESSAGESRS = {}
|
||||
-- MESSAGE:New("Test message!",15,"SPAWN"):ToSRS()
|
||||
--
|
||||
function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,Gender,Culture,Voice,Coalition,Volume,Label,Coordinate)
|
||||
_MESSAGESRS.MSRS = MSRS:New(PathToSRS,Frequency or 243,Modulation or radio.modulation.AM,Volume)
|
||||
_MESSAGESRS.MSRS = MSRS:New(PathToSRS,Frequency or 243,Modulation or radio.modulation.AM)
|
||||
|
||||
_MESSAGESRS.frequency = Frequency
|
||||
_MESSAGESRS.modulation = Modulation or radio.modulation.AM
|
||||
@ -497,7 +497,7 @@ function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,G
|
||||
_MESSAGESRS.MSRS:SetGender(Gender)
|
||||
_MESSAGESRS.Gender = Gender or "female"
|
||||
|
||||
_MESSAGESRS.MSRS:SetGoogle(PathToCredentials)
|
||||
_MESSAGESRS.MSRS:SetProviderOptionsGoogle(PathToCredentials)
|
||||
|
||||
_MESSAGESRS.MSRS:SetLabel(Label or "MESSAGE")
|
||||
_MESSAGESRS.label = Label or "MESSAGE"
|
||||
@ -543,7 +543,7 @@ function MESSAGE:ToSRS(frequency,modulation,gender,culture,voice,coalition,volum
|
||||
_MESSAGESRS.MSRS:SetCoordinate(coordinate)
|
||||
end
|
||||
local category = string.gsub(self.MessageCategory,":","")
|
||||
_MESSAGESRS.SRSQ:NewTransmission(self.MessageText,nil,_MESSAGESRS.MSRS,nil,nil,nil,nil,nil,frequency or _MESSAGESRS.frequency,modulation or _MESSAGESRS.modulation, gender or _MESSAGESRS.Gender,culture or _MESSAGESRS.Culture,nil,volume or _MESSAGESRS.volume,category,coordinate or _MESSAGESRS.coordinate)
|
||||
_MESSAGESRS.SRSQ:NewTransmission(self.MessageText,nil,_MESSAGESRS.MSRS,0.5,1,nil,nil,nil,frequency or _MESSAGESRS.frequency,modulation or _MESSAGESRS.modulation, gender or _MESSAGESRS.Gender,culture or _MESSAGESRS.Culture,nil,volume or _MESSAGESRS.volume,category,coordinate or _MESSAGESRS.coordinate)
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
@ -526,7 +526,7 @@ function MSRS:SetBackend(Backend)
|
||||
end
|
||||
|
||||
if Checker(Backend) then
|
||||
self.backend=Backend or MSRS.Backend.SRSEXE
|
||||
self.backend=Backend
|
||||
else
|
||||
MESSAGE:New("ERROR: Backend "..tostring(Backend).." is not supported!",30,"MSRS",true):ToLog():ToAll()
|
||||
end
|
||||
@ -1196,8 +1196,8 @@ end
|
||||
-- @param Core.Point#COORDINATE Coordinate Coordinate.
|
||||
-- @return #MSRS self
|
||||
function MSRS:PlayTextExt(Text, Delay, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label, Coordinate)
|
||||
self:F( {Text, Delay, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label, Coordinate} )
|
||||
|
||||
self:T(( {Text, Delay, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label, Coordinate} )
|
||||
self:T((self.lid.."Backend "..self.backend)
|
||||
if Delay and Delay>0 then
|
||||
self:ScheduleOnce(Delay, MSRS.PlayTextExt, self, Text, 0, Frequencies, Modulations, Gender, Culture, Voice, Volume, Label, Coordinate)
|
||||
else
|
||||
@ -1217,6 +1217,7 @@ function MSRS:PlayTextExt(Text, Delay, Frequencies, Modulations, Gender, Culture
|
||||
self:_ExecCommand(command)
|
||||
|
||||
elseif self.backend==MSRS.Backend.GRPC then
|
||||
--BASE:I("MSRS.Backend.GRPC")
|
||||
|
||||
self:_DCSgRPCtts(Text, Frequencies, Gender, Culture, Voice, Volume, Label, Coordinate)
|
||||
|
||||
@ -1843,7 +1844,7 @@ end
|
||||
-- @param #MSRSQUEUE self
|
||||
-- @return #MSRSQUEUE self The MSRSQUEUE object.
|
||||
function MSRSQUEUE:Clear()
|
||||
self:I(self.lid.."Clearing MSRSQUEUE")
|
||||
self:T((self.lid.."Clearing MSRSQUEUE")
|
||||
self.queue={}
|
||||
return self
|
||||
end
|
||||
@ -1854,7 +1855,6 @@ end
|
||||
-- @param #MSRSQUEUE.Transmission transmission The transmission data table.
|
||||
-- @return #MSRSQUEUE self
|
||||
function MSRSQUEUE:AddTransmission(transmission)
|
||||
|
||||
-- Init.
|
||||
transmission.isplaying=false
|
||||
transmission.Tstarted=nil
|
||||
@ -1933,20 +1933,20 @@ function MSRSQUEUE:NewTransmission(text, duration, msrs, tstart, interval, subgr
|
||||
transmission.Tplay=tstart or timer.getAbsTime()
|
||||
transmission.subtitle=subtitle
|
||||
transmission.interval=interval or 0
|
||||
transmission.frequency=frequency
|
||||
transmission.modulation=modulation
|
||||
transmission.frequency=frequency or msrs.frequencies
|
||||
transmission.modulation=modulation or msrs.modulations
|
||||
transmission.subgroups=subgroups
|
||||
if transmission.subtitle then
|
||||
transmission.subduration=subduration or transmission.duration
|
||||
else
|
||||
transmission.subduration=0 --nil
|
||||
end
|
||||
transmission.gender = gender
|
||||
transmission.culture = culture
|
||||
transmission.voice = voice
|
||||
transmission.volume = volume
|
||||
transmission.label = label
|
||||
transmission.coordinate = coordinate
|
||||
transmission.gender = gender or msrs.gender
|
||||
transmission.culture = culture or msrs.culture
|
||||
transmission.voice = voice or msrs.voice
|
||||
transmission.volume = volume or msrs.volume
|
||||
transmission.label = label or msrs.Label
|
||||
transmission.coordinate = coordinate or msrs.coordinate
|
||||
|
||||
-- Add transmission to queue.
|
||||
self:AddTransmission(transmission)
|
||||
@ -1958,7 +1958,8 @@ end
|
||||
-- @param #MSRSQUEUE self
|
||||
-- @param #MSRSQUEUE.Transmission transmission The transmission.
|
||||
function MSRSQUEUE:Broadcast(transmission)
|
||||
|
||||
self:T((self.lid.."Broadcast")
|
||||
|
||||
if transmission.frequency then
|
||||
transmission.msrs:PlayTextExt(transmission.text, nil, transmission.frequency, transmission.modulation, transmission.gender, transmission.culture, transmission.voice, transmission.volume, transmission.label, transmission.coordinate)
|
||||
else
|
||||
@ -2127,7 +2128,7 @@ function MSRSQUEUE:_CheckRadioQueue(delay)
|
||||
-- Found a new transmission.
|
||||
if next~=nil and not playing then
|
||||
-- Debug info.
|
||||
self:T(self.lid..string.format("Broadcasting text=\"%s\" at T=%.3f", next.text, time))
|
||||
self:T((self.lid..string.format("Broadcasting text=\"%s\" at T=%.3f", next.text, time))
|
||||
|
||||
-- Call SRS.
|
||||
self:Broadcast(next)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user