mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
SRS - adding volume setting and a test on OS and IO available
OpsGroup - added volume options for `SetSRS`
This commit is contained in:
parent
0da8afc108
commit
ef4398a5f1
@ -2039,8 +2039,9 @@ end
|
||||
-- @param #number Port SRS port. Default 5002.
|
||||
-- @param #string PathToGoogleKey Full path to the google credentials JSON file, e.g. `"C:\Users\myUsername\Downloads\key.json"`.
|
||||
-- @param #string Label Label of the SRS comms for the SRS Radio overlay. Defaults to "ROBOT". No spaces allowed!
|
||||
-- @param #number Volume Volume to be set, 0.0 = silent, 1.0 = loudest. Defaults to 1.0
|
||||
-- @return #OPSGROUP self
|
||||
function OPSGROUP:SetSRS(PathToSRS, Gender, Culture, Voice, Port, PathToGoogleKey, Label)
|
||||
function OPSGROUP:SetSRS(PathToSRS, Gender, Culture, Voice, Port, PathToGoogleKey, Label, Volume)
|
||||
self.useSRS=true
|
||||
self.msrs=MSRS:New(PathToSRS, self.frequency, self.modulation)
|
||||
self.msrs:SetGender(Gender)
|
||||
@ -2052,6 +2053,7 @@ function OPSGROUP:SetSRS(PathToSRS, Gender, Culture, Voice, Port, PathToGoogleKe
|
||||
self.msrs:SetGoogle(PathToGoogleKey)
|
||||
end
|
||||
self.msrs:SetCoalition(self:GetCoalition())
|
||||
self.msrs:SetVolume(Volume)
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
@ -111,6 +111,10 @@
|
||||
--
|
||||
-- Use @{#MSRS.SetPort} to define the SRS port. Defaults to 5002.
|
||||
--
|
||||
-- ## Set SRS Volume
|
||||
--
|
||||
-- Use @{#MSRS.SetVolume} to define the SRS volume. Defaults to 1.0. Allowed values are between 0.0 and 1.0, from silent to loudest.
|
||||
--
|
||||
-- @field #MSRS
|
||||
MSRS = {
|
||||
ClassName = "MSRS",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user