// The refname is a string to identify this sample to the sound manager
// The repeating flag indicates whether the message should be repeated continuously or played once.
void FGATC::Render(string& msg, const string& refname, bool repeating) {
+ fgSetString("/sim/messages/atc", msg.c_str());
#ifdef ENABLE_AUDIO_SUPPORT
_voice = (_voiceOK && fgGetBool("/sim/sound/voice"));
if(_voice) {
//cout << "Doing callback...\n";
ATCMenuEntry a = atcmlist[num];
atcptr->SetFreqInUse();
+ string pilot = atcptr->GenText(a.transmission, a.callback_code);
+ fgSetString("/sim/messages/pilot", pilot.c_str());
// This is the user's speech getting displayed.
- globals->get_ATC_display()->RegisterSingleMessage(atcptr->GenText(a.transmission, a.callback_code));
+ globals->get_ATC_display()->RegisterSingleMessage(pilot);
_callbackPending = true;
_callbackTimer = 0.0;
_callbackWait = 5.0;
tpars.alt = planes[i].aalt;
message = current_transmissionlist->gen_text(station, code, tpars, true );
//cout << message << '\n';
- globals->get_ATC_display()->RegisterSingleMessage( message, 0 );
+ set_message(message);
planes[i].lmc = code;
planes[i].tlm = etime_node->getDoubleValue();
planes[i].on_crs = true;
message = current_transmissionlist->gen_text(station, code, tpars, true );
//cout << "Approach transmitting...\n";
//cout << message << endl;
- globals->get_ATC_display()->RegisterSingleMessage( message, 0 );
-
+ set_message(message);
}
else {
code.c1 = 1;
message = current_transmissionlist->gen_text(station, code, tpars, true);
//cout << "Approach transmitting 2 ...\n";
//cout << message << endl;
- globals->get_ATC_display()->RegisterSingleMessage( message, 0 );
+ set_message(message);
}
planes[i].lmc = code;
planes[i].tlm = etime_node->getDoubleValue();
message = current_transmissionlist->gen_text(station, code, tpars, true);
//cout << "Approach transmitting 3 ...\n";
//cout << message << '\n';
- globals->get_ATC_display()->RegisterSingleMessage( message, 0 );
+ set_message(message);
planes[i].lmc = code;
planes[i].tlm = etime_node->getDoubleValue();
}
message = current_transmissionlist->gen_text(station, code, tpars, true);
//cout << "Approach transmitting 4 ...\n";
//cout << message << '\n';
- globals->get_ATC_display()->RegisterSingleMessage( message, 0 );
+ set_message(message);
planes[i].lmc = code;
planes[i].tlm = etime_node->getDoubleValue();
message = current_transmissionlist->gen_text(station, code, tpars, true);
//cout << "Approach transmitting 5 ...\n";
//cout << message << '\n';
- globals->get_ATC_display()->RegisterSingleMessage( message, 0 );
+ set_message(message);
planes[i].lmc = code;
planes[i].tlm = etime_node->getDoubleValue();
return num_planes;
}
+
+
+void FGApproach::set_message(const string &msg)
+{
+ fgSetString("/sim/messages/approach", msg.c_str());
+ globals->get_ATC_display()->RegisterSingleMessage( msg, 0 );
+}
+
// eg " taxi holding point G2 runway "
trns += ConvertRwyNumToSpokenString(activeRwy);
if(_display) {
+ fgSetString("/sim/messages/ground", trns.c_str());
globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
}
g->planePtr->RegisterTransmission(1); // cleared to taxi
sprintf(buf, "%.2f", f);
trns += buf;
if(_display) {
+ fgSetString("/sim/messages/ground", trns.c_str());
globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
}
g->planePtr->RegisterTransmission(2); // contact tower