mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#OPSGROUP #FLIGHTCONTROL
* Added setting coordinate for SRS
This commit is contained in:
@@ -424,12 +424,14 @@ function FLIGHTCONTROL:New(AirbaseName, Frequency, Modulation, PathToSRS, Port,
|
|||||||
self.msrsTower=MSRS:New(PathToSRS, Frequency, Modulation)
|
self.msrsTower=MSRS:New(PathToSRS, Frequency, Modulation)
|
||||||
self.msrsTower:SetPort(self.Port)
|
self.msrsTower:SetPort(self.Port)
|
||||||
self.msrsTower:SetGoogle(GoogleKey)
|
self.msrsTower:SetGoogle(GoogleKey)
|
||||||
|
self.msrsTower:SetCoordinate(self:GetCoordinate())
|
||||||
self:SetSRSTower()
|
self:SetSRSTower()
|
||||||
|
|
||||||
-- SRS for Pilot.
|
-- SRS for Pilot.
|
||||||
self.msrsPilot=MSRS:New(PathToSRS, Frequency, Modulation)
|
self.msrsPilot=MSRS:New(PathToSRS, Frequency, Modulation)
|
||||||
self.msrsPilot:SetPort(self.Port)
|
self.msrsPilot:SetPort(self.Port)
|
||||||
self.msrsPilot:SetGoogle(GoogleKey)
|
self.msrsPilot:SetGoogle(GoogleKey)
|
||||||
|
self.msrsTower:SetCoordinate(self:GetCoordinate())
|
||||||
self:SetSRSPilot()
|
self:SetSRSPilot()
|
||||||
|
|
||||||
-- Wait at least 10 seconds after last radio message before calling the next status update.
|
-- Wait at least 10 seconds after last radio message before calling the next status update.
|
||||||
@@ -4341,7 +4343,7 @@ function FLIGHTCONTROL:TransmissionPilot(Text, Flight, Delay)
|
|||||||
local text=self:_GetTextForSpeech(Text)
|
local text=self:_GetTextForSpeech(Text)
|
||||||
|
|
||||||
-- MSRS instance to use.
|
-- MSRS instance to use.
|
||||||
local msrs=self.msrsPilot
|
local msrs=self.msrsPilot -- Sound.SRS#MSRS
|
||||||
|
|
||||||
if Flight.useSRS and Flight.msrs then
|
if Flight.useSRS and Flight.msrs then
|
||||||
|
|
||||||
@@ -4361,6 +4363,8 @@ function FLIGHTCONTROL:TransmissionPilot(Text, Flight, Delay)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Add transmission to msrsqueue.
|
-- Add transmission to msrsqueue.
|
||||||
|
local coordinate = Flight:GetCoordinate(true)
|
||||||
|
msrs:SetCoordinate()
|
||||||
self.msrsqueue:NewTransmission(text, nil, msrs, nil, 1, subgroups, Text, nil, self.frequency, self.modulation)
|
self.msrsqueue:NewTransmission(text, nil, msrs, nil, 1, subgroups, Text, nil, self.frequency, self.modulation)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2345,6 +2345,10 @@ function OPSGROUP:RadioTransmission(Text, Delay, SayCallsign, Frequency)
|
|||||||
|
|
||||||
local freq, modu, radioon=self:GetRadio()
|
local freq, modu, radioon=self:GetRadio()
|
||||||
|
|
||||||
|
local coord = self:GetCoordinate()
|
||||||
|
|
||||||
|
self.msrs:SetCoordinate(coord)
|
||||||
|
|
||||||
if Frequency then
|
if Frequency then
|
||||||
self.msrs:SetFrequencies(Frequency)
|
self.msrs:SetFrequencies(Frequency)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user