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:
parent
261a389ca5
commit
1093e55ea8
@ -424,12 +424,14 @@ function FLIGHTCONTROL:New(AirbaseName, Frequency, Modulation, PathToSRS, Port,
|
||||
self.msrsTower=MSRS:New(PathToSRS, Frequency, Modulation)
|
||||
self.msrsTower:SetPort(self.Port)
|
||||
self.msrsTower:SetGoogle(GoogleKey)
|
||||
self.msrsTower:SetCoordinate(self:GetCoordinate())
|
||||
self:SetSRSTower()
|
||||
|
||||
-- SRS for Pilot.
|
||||
self.msrsPilot=MSRS:New(PathToSRS, Frequency, Modulation)
|
||||
self.msrsPilot:SetPort(self.Port)
|
||||
self.msrsPilot:SetGoogle(GoogleKey)
|
||||
self.msrsTower:SetCoordinate(self:GetCoordinate())
|
||||
self:SetSRSPilot()
|
||||
|
||||
-- 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)
|
||||
|
||||
-- MSRS instance to use.
|
||||
local msrs=self.msrsPilot
|
||||
local msrs=self.msrsPilot -- Sound.SRS#MSRS
|
||||
|
||||
if Flight.useSRS and Flight.msrs then
|
||||
|
||||
@ -4361,6 +4363,8 @@ function FLIGHTCONTROL:TransmissionPilot(Text, Flight, Delay)
|
||||
end
|
||||
|
||||
-- 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)
|
||||
|
||||
end
|
||||
|
||||
@ -2345,6 +2345,10 @@ function OPSGROUP:RadioTransmission(Text, Delay, SayCallsign, Frequency)
|
||||
|
||||
local freq, modu, radioon=self:GetRadio()
|
||||
|
||||
local coord = self:GetCoordinate()
|
||||
|
||||
self.msrs:SetCoordinate(coord)
|
||||
|
||||
if Frequency then
|
||||
self.msrs:SetFrequencies(Frequency)
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user