]> git.mxchange.org Git - flightgear.git/commitdiff
Merge branch 'next' into comm-subsystem
authoradrian <adrian@localhost.com>
Thu, 6 Oct 2011 12:18:44 +0000 (15:18 +0300)
committeradrian <adrian@localhost.com>
Thu, 6 Oct 2011 12:18:44 +0000 (15:18 +0300)
Conflicts:
src/ATC/trafficcontrol.cxx
src/ATC/trafficcontrol.hxx
src/Instrumentation/CMakeLists.txt

1  2 
src/ATC/trafficcontrol.cxx
src/Airports/groundnetwork.cxx

index 0f67094b8c231d7301c888b80ff1824fc7a8e7e6,685df21da7773ebe825f4f9d4b951e8fceedbca7..945f9d9c425acb6b5e403870d4b7db348d66e25a
@@@ -491,12 -482,12 +482,12 @@@ string FGATCController::getGateName(FGA
      return ref->atGate();
  }
  
- bool FGATCController::isUserAircraft(FGAIAircraft* ac) 
- { 
-     return (ac->getCallSign() == fgGetString("/sim/multiplay/callsign")) ? true : false; 
+ bool FGATCController::isUserAircraft(FGAIAircraft* ac)
+ {
+     return (ac->getCallSign() == fgGetString("/sim/multiplay/callsign")) ? true : false;
  };
  
 -void FGATCController::transmit(FGTrafficRecord * rec, AtcMsgId msgId,
 +void FGATCController::transmit(FGTrafficRecord * rec, FGAirportDynamics *parent, AtcMsgId msgId,
                                 AtcMsgDir msgDir, bool audible)
  {
      string sender, receiver;
          // Display ATC message only when one of the radios is tuned
          // the relevant frequency.
          // Note that distance attenuation is currently not yet implemented
 +                
          if ((onBoardRadioFreqI0 == stationFreq)
-             || (onBoardRadioFreqI1 == stationFreq)) {
-               
+                 || (onBoardRadioFreqI1 == stationFreq)) {
              if (rec->allowTransmissions()) {
 +              
                  fgSetString("/sim/messages/atc", text.c_str());
              }
          }
@@@ -1155,13 -1145,12 +1150,12 @@@ bool FGStartupController::checkTransmis
              int n = trans_num->getIntValue();
              if (n == 0) {
                  trans_num->setIntValue(-1);
-                  // PopupCallback(n);
-                  //cerr << "Selected transmission message " << n << endl;
-                  FGATCManager *atc = (FGATCManager*) globals->get_subsystem("atc");
-                  atc->getATCDialog()->removeEntry(1);
+                 // PopupCallback(n);
+                 //cerr << "Selected transmission message " << n << endl;
+                 FGATCDialogNew::instance()->removeEntry(1);
              } else {
                  //cerr << "creading message for " << i->getAircraft()->getCallSign() << endl;
 -                transmit(&(*i), msgId, msgDir, false);
 +                transmit(&(*i), &(*parent), msgId, msgDir, false);
                  return false;
              }
          }
index 398fd5776e2d028c9de3a16e92cfdc9e686878ff,47753b2880139bbd13ca1b8f09a42b228bb680e2..c4995f1201be8470723fb46f5898392a453b978e
@@@ -676,13 -682,13 +682,13 @@@ bool FGGroundNetwork::checkTransmission
              int n = trans_num->getIntValue();
              if (n == 0) {
                  trans_num->setIntValue(-1);
-                  // PopupCallback(n);
-                  //cerr << "Selected transmission message " << n << endl;
-                  FGATCManager *atc = (FGATCManager*) globals->get_subsystem("atc");
-                  atc->getATCDialog()->removeEntry(1);
+                 // PopupCallback(n);
+                 //cerr << "Selected transmission message " << n << endl;
+                 FGATCManager *atc = (FGATCManager*) globals->get_subsystem("atc");
+                 FGATCDialogNew::instance()->removeEntry(1);
              } else {
                  //cerr << "creating message for " << i->getAircraft()->getCallSign() << endl;
 -                transmit(&(*i), msgId, msgDir, false);
 +                transmit(&(*i), &(*parent->getDynamics()), msgId, msgDir, false);
                  return false;
              }
          }