1
0
Fork 0

let copilot/ground crew report when engaged in launchbar

This commit is contained in:
mfranz 2007-10-09 14:48:44 +00:00
parent 693bebcd43
commit d003752d20

View file

@ -229,6 +229,7 @@ var msg_repeat = func {
var atc = nil;
var callsign = nil;
var atclast = nil;
var last_launchbar = nil;
var listener = {};
_setlistener("/sim/signals/nasal-dir-initialized", func {
@ -256,6 +257,13 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
}, 1);
}, 5);
setlistener("/gear/launchbar/state", func {
var e = cmdarg().getValue();
if (e != last_launchbar and e == "Engaged")
setprop("/sim/messages/copilot", "Engaged!");
last_launchbar = e;
});
# map ATC messages to the screen log and to the voice subsystem
var map = func(type, msg, r, g, b) {
setprop("/sim/sound/voices/" ~ type, msg);