From: adrian Date: Thu, 6 Oct 2011 12:18:44 +0000 (+0300) Subject: Merge branch 'next' into comm-subsystem X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=312447c565ec410f52353ba22d305cf470e9ba33;p=flightgear.git Merge branch 'next' into comm-subsystem Conflicts: src/ATC/trafficcontrol.cxx src/ATC/trafficcontrol.hxx src/Instrumentation/CMakeLists.txt --- 312447c565ec410f52353ba22d305cf470e9ba33 diff --cc src/ATC/trafficcontrol.cxx index 0f67094b8,685df21da..945f9d9c4 --- a/src/ATC/trafficcontrol.cxx +++ b/src/ATC/trafficcontrol.cxx @@@ -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; @@@ -726,12 -715,9 +717,11 @@@ // 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; } } diff --cc src/Airports/groundnetwork.cxx index 398fd5776,47753b288..c4995f120 --- a/src/Airports/groundnetwork.cxx +++ b/src/Airports/groundnetwork.cxx @@@ -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; } }