Added animation and a bit of functionality to the ACP

Signed-off-by: merspieler <merspieler@airmail.cc>
This commit is contained in:
merspieler 2018-10-21 17:12:35 +02:00
parent 69be565187
commit c309ddcf3b
6 changed files with 2884 additions and 27 deletions

View file

@ -1519,6 +1519,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,42 +452,21 @@
<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_apu_led</object-name>
<object-name>ecam_bleed_led</object-name>
<object-name>ecam_cond_led</object-name>
<object-name>ecam_clr_l_led</object-name>
<object-name>ecam_clr_r_led</object-name>
<object-name>ecam_c_b_led</object-name>
<object-name>ecam_door_led</object-name>
<object-name>ecam_elec_led</object-name>
<object-name>ecam_el_dc_led</object-name>
<object-name>ecam_eng_led</object-name>
<object-name>ecam_fctl_led</object-name>
<object-name>ecam_fuel_led</object-name>
<object-name>ecam_hyd_led</object-name>
<object-name>ecam_press_led</object-name>
<object-name>ecam_sts_led</object-name>
<object-name>ecam_wheel_led</object-name>
<object-name>exped_led</object-name>
<object-name>hdg-text-test</object-name>
<object-name>master_caution_on</object-name>
<object-name>master_warning_on</object-name>
<object-name>qnh-test</object-name>
<object-name>radio_opt_led</object-name>
<object-name>rudder-trim-test</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

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