mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
xxx
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
-- ### Author: **applevangelist**
|
-- ### Author: **applevangelist**
|
||||||
-- @date Last Update Nov 2023
|
-- @date Last Update Jan 2024
|
||||||
-- @module Ops.AWACS
|
-- @module Ops.AWACS
|
||||||
-- @image OPS_AWACS.jpg
|
-- @image OPS_AWACS.jpg
|
||||||
|
|
||||||
@@ -507,7 +507,7 @@ do
|
|||||||
-- @field #AWACS
|
-- @field #AWACS
|
||||||
AWACS = {
|
AWACS = {
|
||||||
ClassName = "AWACS", -- #string
|
ClassName = "AWACS", -- #string
|
||||||
version = "0.2.59", -- #string
|
version = "0.2.60", -- #string
|
||||||
lid = "", -- #string
|
lid = "", -- #string
|
||||||
coalition = coalition.side.BLUE, -- #number
|
coalition = coalition.side.BLUE, -- #number
|
||||||
coalitiontxt = "blue", -- #string
|
coalitiontxt = "blue", -- #string
|
||||||
@@ -1405,15 +1405,17 @@ function AWACS:SetTacticalRadios(BaseFreq,Increase,Modulation,Interval,Number)
|
|||||||
self.TacticalFrequencies[freq] = freq
|
self.TacticalFrequencies[freq] = freq
|
||||||
end
|
end
|
||||||
if self.AwacsSRS then
|
if self.AwacsSRS then
|
||||||
self.TacticalSRS = MSRS:New(self.PathToSRS,self.TacticalBaseFreq,self.TacticalModulation,self.Volume)
|
self.TacticalSRS = MSRS:New(self.PathToSRS,self.TacticalBaseFreq,self.TacticalModulation)
|
||||||
self.TacticalSRS:SetCoalition(self.coalition)
|
self.TacticalSRS:SetCoalition(self.coalition)
|
||||||
self.TacticalSRS:SetGender(self.Gender)
|
self.TacticalSRS:SetGender(self.Gender)
|
||||||
self.TacticalSRS:SetCulture(self.Culture)
|
self.TacticalSRS:SetCulture(self.Culture)
|
||||||
self.TacticalSRS:SetVoice(self.Voice)
|
self.TacticalSRS:SetVoice(self.Voice)
|
||||||
self.TacticalSRS:SetPort(self.Port)
|
self.TacticalSRS:SetPort(self.Port)
|
||||||
self.TacticalSRS:SetLabel("AWACS")
|
self.TacticalSRS:SetLabel("AWACS")
|
||||||
|
self.TacticalSRS:SetVolume(self.Volume)
|
||||||
if self.PathToGoogleKey then
|
if self.PathToGoogleKey then
|
||||||
self.TacticalSRS:SetGoogle(self.PathToGoogleKey)
|
--self.TacticalSRS:SetGoogle(self.PathToGoogleKey)
|
||||||
|
self.TacticalSRS:SetProviderOptionsGoogle(self.PathToGoogleKey,self.AccessKey)
|
||||||
end
|
end
|
||||||
self.TacticalSRSQ = MSRSQUEUE:New("Tactical AWACS")
|
self.TacticalSRSQ = MSRSQUEUE:New("Tactical AWACS")
|
||||||
end
|
end
|
||||||
@@ -2079,8 +2081,9 @@ end
|
|||||||
-- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.
|
-- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.
|
||||||
-- @param #number Volume Volume - between 0.0 (silent) and 1.0 (loudest)
|
-- @param #number Volume Volume - between 0.0 (silent) and 1.0 (loudest)
|
||||||
-- @param #string PathToGoogleKey Path to your google key if you want to use google TTS
|
-- @param #string PathToGoogleKey Path to your google key if you want to use google TTS
|
||||||
|
-- @param #string AccessKey Your Google API access key. This is necessary if DCS-gRPC is used as backend.
|
||||||
-- @return #AWACS self
|
-- @return #AWACS self
|
||||||
function AWACS:SetSRS(PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey)
|
function AWACS:SetSRS(PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,AccessKey)
|
||||||
self:T(self.lid.."SetSRS")
|
self:T(self.lid.."SetSRS")
|
||||||
self.PathToSRS = PathToSRS or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
|
self.PathToSRS = PathToSRS or "C:\\Program Files\\DCS-SimpleRadio-Standalone"
|
||||||
self.Gender = Gender or "male"
|
self.Gender = Gender or "male"
|
||||||
@@ -2088,17 +2091,20 @@ function AWACS:SetSRS(PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey
|
|||||||
self.Port = Port or 5002
|
self.Port = Port or 5002
|
||||||
self.Voice = Voice
|
self.Voice = Voice
|
||||||
self.PathToGoogleKey = PathToGoogleKey
|
self.PathToGoogleKey = PathToGoogleKey
|
||||||
|
self.AccessKey = AccessKey
|
||||||
self.Volume = Volume or 1.0
|
self.Volume = Volume or 1.0
|
||||||
|
|
||||||
self.AwacsSRS = MSRS:New(self.PathToSRS,self.MultiFrequency,self.MultiModulation,self.Volume)
|
self.AwacsSRS = MSRS:New(self.PathToSRS,self.MultiFrequency,self.MultiModulation)
|
||||||
self.AwacsSRS:SetCoalition(self.coalition)
|
self.AwacsSRS:SetCoalition(self.coalition)
|
||||||
self.AwacsSRS:SetGender(self.Gender)
|
self.AwacsSRS:SetGender(self.Gender)
|
||||||
self.AwacsSRS:SetCulture(self.Culture)
|
self.AwacsSRS:SetCulture(self.Culture)
|
||||||
self.AwacsSRS:SetVoice(self.Voice)
|
self.AwacsSRS:SetVoice(self.Voice)
|
||||||
self.AwacsSRS:SetPort(self.Port)
|
self.AwacsSRS:SetPort(self.Port)
|
||||||
self.AwacsSRS:SetLabel("AWACS")
|
self.AwacsSRS:SetLabel("AWACS")
|
||||||
|
self.AwacsSRS:SetVolume(Volume)
|
||||||
if self.PathToGoogleKey then
|
if self.PathToGoogleKey then
|
||||||
self.AwacsSRS:SetGoogle(self.PathToGoogleKey)
|
--self.AwacsSRS:SetGoogle(self.PathToGoogleKey)
|
||||||
|
self.AwacsSRS:SetProviderOptionsGoogle(self.PathToGoogleKey,self.AccessKey)
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@@ -6595,7 +6601,7 @@ function AWACS:onafterCheckTacticalQueue(From,Event,To)
|
|||||||
if self.PathToGoogleKey then
|
if self.PathToGoogleKey then
|
||||||
gtext = string.format("<speak><prosody rate='medium'>%s</prosody></speak>",gtext)
|
gtext = string.format("<speak><prosody rate='medium'>%s</prosody></speak>",gtext)
|
||||||
end
|
end
|
||||||
self.TacticalSRSQ:NewTransmission(gtext,nil,self.TacticalSRS,nil,0.5,nil,nil,nil,frequency,self.TacticalModulation,nil,nil,nil,nil,nil)
|
self.TacticalSRSQ:NewTransmission(gtext,nil,self.TacticalSRS,nil,0.5,nil,nil,nil,frequency,self.TacticalModulation)
|
||||||
|
|
||||||
self:T(RadioEntry.TextTTS)
|
self:T(RadioEntry.TextTTS)
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
-- ===
|
-- ===
|
||||||
-- @module Ops.PlayerTask
|
-- @module Ops.PlayerTask
|
||||||
-- @image OPS_PlayerTask.jpg
|
-- @image OPS_PlayerTask.jpg
|
||||||
-- @date Last Update Oct 2023
|
-- @date Last Update Jan 2024
|
||||||
|
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -1552,7 +1552,7 @@ PLAYERTASKCONTROLLER.Messages = {
|
|||||||
|
|
||||||
--- PLAYERTASK class version.
|
--- PLAYERTASK class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
PLAYERTASKCONTROLLER.version="0.1.63"
|
PLAYERTASKCONTROLLER.version="0.1.64"
|
||||||
|
|
||||||
--- Create and run a new TASKCONTROLLER instance.
|
--- Create and run a new TASKCONTROLLER instance.
|
||||||
-- @param #PLAYERTASKCONTROLLER self
|
-- @param #PLAYERTASKCONTROLLER self
|
||||||
@@ -4005,9 +4005,10 @@ end
|
|||||||
-- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.
|
-- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.
|
||||||
-- @param #number Volume (Optional) Volume - between 0.0 (silent) and 1.0 (loudest)
|
-- @param #number Volume (Optional) Volume - between 0.0 (silent) and 1.0 (loudest)
|
||||||
-- @param #string PathToGoogleKey (Optional) Path to your google key if you want to use google TTS
|
-- @param #string PathToGoogleKey (Optional) Path to your google key if you want to use google TTS
|
||||||
|
-- @param #string AccessKey Your Google API access key. This is necessary if DCS-gRPC is used as backend.
|
||||||
-- @param Core.Point#COORDINATE Coordinate Coordinate from which the controller radio is sending
|
-- @param Core.Point#COORDINATE Coordinate Coordinate from which the controller radio is sending
|
||||||
-- @return #PLAYERTASKCONTROLLER self
|
-- @return #PLAYERTASKCONTROLLER self
|
||||||
function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,Coordinate)
|
function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,AccessKey,Coordinate)
|
||||||
self:T(self.lid.."SetSRS")
|
self:T(self.lid.."SetSRS")
|
||||||
self.PathToSRS = PathToSRS or "C:\\Program Files\\DCS-SimpleRadio-Standalone" --
|
self.PathToSRS = PathToSRS or "C:\\Program Files\\DCS-SimpleRadio-Standalone" --
|
||||||
self.Gender = Gender or "male" --
|
self.Gender = Gender or "male" --
|
||||||
@@ -4015,6 +4016,7 @@ function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Cultu
|
|||||||
self.Port = Port or 5002 --
|
self.Port = Port or 5002 --
|
||||||
self.Voice = Voice --
|
self.Voice = Voice --
|
||||||
self.PathToGoogleKey = PathToGoogleKey --
|
self.PathToGoogleKey = PathToGoogleKey --
|
||||||
|
self.AccessKey = AccessKey
|
||||||
self.Volume = Volume or 1.0 --
|
self.Volume = Volume or 1.0 --
|
||||||
self.UseSRS = true
|
self.UseSRS = true
|
||||||
self.Frequency = Frequency or {127,251} --
|
self.Frequency = Frequency or {127,251} --
|
||||||
@@ -4022,15 +4024,17 @@ function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Cultu
|
|||||||
self.Modulation = Modulation or {radio.modulation.FM,radio.modulation.AM} --
|
self.Modulation = Modulation or {radio.modulation.FM,radio.modulation.AM} --
|
||||||
self.BCModulation = self.Modulation
|
self.BCModulation = self.Modulation
|
||||||
-- set up SRS
|
-- set up SRS
|
||||||
self.SRS=MSRS:New(self.PathToSRS,self.Frequency,self.Modulation,self.Volume)
|
self.SRS=MSRS:New(self.PathToSRS,self.Frequency,self.Modulation)
|
||||||
self.SRS:SetCoalition(self.Coalition)
|
self.SRS:SetCoalition(self.Coalition)
|
||||||
self.SRS:SetLabel(self.MenuName or self.Name)
|
self.SRS:SetLabel(self.MenuName or self.Name)
|
||||||
self.SRS:SetGender(self.Gender)
|
self.SRS:SetGender(self.Gender)
|
||||||
self.SRS:SetCulture(self.Culture)
|
self.SRS:SetCulture(self.Culture)
|
||||||
self.SRS:SetPort(self.Port)
|
self.SRS:SetPort(self.Port)
|
||||||
self.SRS:SetVoice(self.Voice)
|
self.SRS:SetVoice(self.Voice)
|
||||||
|
self.SRS:SetVolume(self.Volume)
|
||||||
if self.PathToGoogleKey then
|
if self.PathToGoogleKey then
|
||||||
self.SRS:SetGoogle(self.PathToGoogleKey)
|
--self.SRS:SetGoogle(self.PathToGoogleKey)
|
||||||
|
self.SRS:SetProviderOptionsGoogle(self.PathToGoogleKey,self.AccessKey)
|
||||||
end
|
end
|
||||||
if Coordinate then
|
if Coordinate then
|
||||||
self.SRS:SetCoordinate(Coordinate)
|
self.SRS:SetCoordinate(Coordinate)
|
||||||
|
|||||||
Reference in New Issue
Block a user