Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Applevangelist 2023-12-02 15:11:35 +01:00
commit e79c2481da

View File

@ -1594,8 +1594,16 @@ function ATIS:onafterStart( From, Event, To )
end
-- Info.
self:I( self.lid .. string.format( "Starting ATIS v%s for airbase %s on %.3f MHz Modulation=%d", ATIS.version, self.airbasename, self.frequency, self.modulation ) )
if type(self.frequency) == "table" then
local frequency = table.concat(self.frequency,"/")
local modulation = self.modulation
if type(self.modulation) == "table" then
modulation = table.concat(self.modulation,"/")
end
self:I( self.lid .. string.format( "Starting ATIS v%s for airbase %s on %s MHz Modulation=%s", ATIS.version, self.airbasename, frequency, modulation ) )
else
self:I( self.lid .. string.format( "Starting ATIS v%s for airbase %s on %.3f MHz Modulation=%d", ATIS.version, self.airbasename, self.frequency, self.modulation ) )
end
-- Start radio queue.
if not self.useSRS then
self.radioqueue = RADIOQUEUE:New( self.frequency, self.modulation, string.format( "ATIS %s", self.airbasename ) )
@ -1653,7 +1661,17 @@ function ATIS:onafterStatus( From, Event, To )
end
-- Info text.
local text = string.format( "State %s: Freq=%.3f MHz %s", fsmstate, self.frequency, UTILS.GetModulationName( self.modulation ) )
local text = ""
if type(self.frequency) == "table" then
local frequency = table.concat(self.frequency,"/")
local modulation = self.modulation
if type(self.modulation) == "table" then
modulation = table.concat(self.modulation,"/")
end
text = string.format( "State %s: Freq=%s MHz %s", fsmstate, frequency, modulation )
else
text = string.format( "State %s: Freq=%.3f MHz %s", fsmstate, self.frequency, UTILS.GetModulationName( self.modulation ) )
end
if self.useSRS then
text = text .. string.format( ", SRS path=%s (%s), gender=%s, culture=%s, voice=%s", tostring( self.msrs.path ), tostring( self.msrs.port ), tostring( self.msrs.gender ), tostring( self.msrs.culture ), tostring( self.msrs.voice ) )
else
@ -2919,8 +2937,17 @@ function ATIS:UpdateMarker( information, runact, wind, altimeter, temperature )
if self.markerid then
self.airbase:GetCoordinate():RemoveMark( self.markerid )
end
local text = string.format( "ATIS on %.3f %s, %s:\n", self.frequency, UTILS.GetModulationName( self.modulation ), tostring( information ) )
local text = ""
if type(self.frequency) == "table" then
local frequency = table.concat(self.frequency,"/")
local modulation = self.modulation
if type(modulation) == "table" then
modulation = table.concat(self.modulation,"/")
end
text = string.format( "ATIS on %s %s, %s:\n", tostring(frequency), tostring(modulation), tostring( information ) )
else
text = string.format( "ATIS on %.3f %s, %s:\n", self.frequency, UTILS.GetModulationName( self.modulation ), tostring( information ) )
end
text = text .. string.format( "%s\n", tostring( runact ) )
text = text .. string.format( "%s\n", tostring( wind ) )
text = text .. string.format( "%s\n", tostring( altimeter ) )