]> git.mxchange.org Git - flightgear.git/commitdiff
Restore ATIS reception with nav receivers.
authorThorstenB <brehmt@gmail.com>
Sun, 15 Jul 2012 17:02:05 +0000 (19:02 +0200)
committerThorstenB <brehmt@gmail.com>
Sun, 15 Jul 2012 17:02:05 +0000 (19:02 +0200)
nav radios can be used for comm reception - mainly to receive ATIS. This
had worked with FG 2.6, but was lost in the ATCMgr->ATISMgr conversion.

src/ATCDCL/ATISmgr.cxx

index bfe1e6314deb0c99d79cd86012d3c9f784954c4c..0df65051e8bb95b402805172d01ed3d0c82d7057 100644 (file)
@@ -39,7 +39,7 @@ using flightgear::CommStation;
 
 FGATISMgr::FGATISMgr() :
     _currentUnit(0),
-    _maxCommRadios(2),
+    _maxCommRadios(4),
 #ifdef ENABLE_AUDIO_SUPPORT
     voice(true),
     voice1(0)
@@ -82,7 +82,11 @@ void FGATISMgr::init()
     for (unsigned int unit = 0;unit < _maxCommRadios; ++unit)
     {
         CommRadioData data;
-        string ncunit = "comm[" + decimalNumeral(unit) + "]";
+        string ncunit;
+        if (unit < _maxCommRadios/2)
+            ncunit = "comm[" + decimalNumeral(unit) + "]";
+        else
+            ncunit = "nav[" + decimalNumeral(unit - _maxCommRadios/2) + "]";
         string commbase = "/instrumentation/" + ncunit;
         string commfreq = commbase + "/frequencies/selected-mhz";