Merge pull request #54 from merspieler/acp-master

Added animation and a bit of functionality to the ACP
This commit is contained in:
Joshua Davidson 2018-11-11 17:53:14 -05:00 committed by GitHub
commit ca5733c4da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 2884 additions and 14 deletions

View file

@ -1549,6 +1549,9 @@
<rmp>
<file>Aircraft/IDG-A32X/Nasal/rmp.nas</file>
</rmp>
<acp>
<file>Aircraft/IDG-A32X/Nasal/acp.nas</file>
</acp>
</nasal>
</PropertyList>

View file

@ -452,21 +452,13 @@
<animation>
<type>select</type>
<object-name>alt-text-test</object-name>
<object-name>audio_att_led</object-name>
<object-name>audio_att_sgn</object-name>
<object-name>audio_call_hf2_led</object-name>
<object-name>audio_call_hf1_led</object-name>
<object-name>audio_call_vhf1_led</object-name>
<object-name>audio_call_vhf2_led</object-name>
<object-name>audio_call_vhf3_led</object-name>
<object-name>audio_hf1_led</object-name>
<object-name>audio_hf2_led</object-name>
<object-name>audio_mech_led</object-name>
<object-name>audio_mech_sgn</object-name>
<object-name>audio_voice_led</object-name>
<object-name>audio_vhf1_led</object-name>
<object-name>audio_vhf2_led</object-name>
<object-name>audio_vhf3_led</object-name>
<object-name>autoland_light_on</object-name>
<object-name>ecam_clr_l_led</object-name>
<object-name>ecam_clr_r_led</object-name>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

56
Nasal/acp.nas Normal file
View file

@ -0,0 +1,56 @@
# A3XX Audio Control Panel
# merspieler
############################
# Copyright (c) merspieler #
############################
# NOTE: This is just temporary until FG allows a full implementation of the audio system.
var vhf1_recive = props.globals.initNode("/controls/audio/acp[0]/vhf1-recive", 1, "BOOL");
var vhf2_recive = props.globals.initNode("/controls/audio/acp[0]/vhf2-recive", 1, "BOOL");
var vhf1_volume = props.globals.initNode("/controls/audio/acp[0]/vhf1-volume", 1, "DOUBLE");
var vhf2_volume = props.globals.initNode("/controls/audio/acp[0]/vhf2-volume", 1, "DOUBLE");
var com1_volume = props.globals.getNode("/instrumentation/comm[0]/volume");
var com2_volume = props.globals.getNode("/instrumentation/comm[1]/volume");
var init = func() {
vhf1_recive.setValue(1);
vhf2_recive.setValue(1);
vhf1_volume.setValue(1);
vhf2_volume.setValue(0.8);
}
var update_instruments = func(com_no) {
if (com_no == 0) {
if (vhf1_recive.getValue()) {
com1_volume.setValue(vhf1_volume.getValue());
} else {
com1_volume.setValue(0);
}
} else if (com_no == 1) {
if (vhf2_recive.getValue()) {
com2_volume.setValue(vhf2_volume.getValue());
} else {
com2_volume.setValue(0);
}
}
}
setlistener("/controls/audio/acp[0]/vhf1-recive", func {
update_instruments(0);
});
setlistener("/controls/audio/acp[0]/vhf1-volume", func {
update_instruments(0);
});
setlistener("/controls/audio/acp[0]/vhf2-recive", func {
update_instruments(1);
});
setlistener("/controls/audio/acp[0]/vhf2-volume", func {
update_instruments(1);
});

View file

@ -193,6 +193,7 @@ var systemsInit = func {
libraries.BUTTONS.init();
libraries.variousReset();
rmp.init();
acp.init();
}
setlistener("/sim/signals/fdm-initialized", func {