From c309ddcf3b78a2cb04bdeb463b8f8dbbb7c56222 Mon Sep 17 00:00:00 2001 From: merspieler Date: Sun, 21 Oct 2018 17:12:35 +0200 Subject: [PATCH] Added animation and a bit of functionality to the ACP Signed-off-by: merspieler --- A320-main.xml | 3 + Models/FlightDeck/a320.flightdeck.xml | 21 - Models/Instruments/Audio/Audio1.xml | 1415 ++++++++++++++++++++++++- Models/Instruments/Audio/Audio2.xml | 1415 ++++++++++++++++++++++++- Nasal/acp.nas | 56 + Nasal/libraries.nas | 1 + 6 files changed, 2884 insertions(+), 27 deletions(-) create mode 100644 Nasal/acp.nas diff --git a/A320-main.xml b/A320-main.xml index de5022c8..f6925835 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -1519,6 +1519,9 @@ Aircraft/IDG-A32X/Nasal/rmp.nas + + Aircraft/IDG-A32X/Nasal/acp.nas + diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index b7ba081b..baff20c6 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -452,42 +452,21 @@ select alt-text-test - audio_att_led audio_att_sgn audio_call_hf2_led audio_call_hf1_led audio_call_vhf1_led audio_call_vhf2_led audio_call_vhf3_led - audio_hf1_led - audio_hf2_led - audio_mech_led audio_mech_sgn - audio_voice_led - audio_vhf1_led - audio_vhf2_led - audio_vhf3_led autoland_light_on - ecam_apu_led - ecam_bleed_led - ecam_cond_led ecam_clr_l_led ecam_clr_r_led ecam_c_b_led - ecam_door_led - ecam_elec_led ecam_el_dc_led - ecam_eng_led - ecam_fctl_led - ecam_fuel_led - ecam_hyd_led - ecam_press_led ecam_sts_led - ecam_wheel_led exped_led hdg-text-test - master_caution_on - master_warning_on qnh-test radio_opt_led rudder-trim-test diff --git a/Models/Instruments/Audio/Audio1.xml b/Models/Instruments/Audio/Audio1.xml index a24ab8f1..b19b1aaa 100644 --- a/Models/Instruments/Audio/Audio1.xml +++ b/Models/Instruments/Audio/Audio1.xml @@ -1,13 +1,1422 @@ res/Audio1.ac + + + + pick + audio_int_rad + + + + property-assign + controls/audio/acp[0]/int-rad + 2 + + + + + + property-assign + controls/audio/acp[0]/int-rad + 1 + + + + property-assign + controls/audio/acp[0]/int-rad + 0 + + + + + + rotate + audio_int_rad + controls/audio/acp[0]/int-rad + + + 0 + 0 + + + 1 + -20 + + + 2 + 20 + + + + audio_int_rad.axis + + + + + + pick + audio_pa + + + + property-assign + systems/audio/acp[0]/pa + 1 + + + + property-assign + systems/audio/acp[0]/pa + 0 + + + + + + select + audio_pa_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[0]/pa + 1 + + + + + + + + + pick + audio_call_vhf1 + + + false + + property-assign + systems/audio/acp[0]/call_chan + vhf1 + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_call_vhf2 + + + false + + property-assign + systems/audio/acp[0]/call_chan + vhf2 + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_call_vhf3 + + + false + + property-assign + systems/audio/acp[0]/call_chan + vhf3 + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_call_hf1 + + + false + + property-assign + systems/audio/acp[0]/call_chan + hf1 + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_call_hf2 + + + false + + property-assign + systems/audio/acp[0]/call_chan + hf2 + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_mech + + + false + + property-assign + systems/audio/acp[0]/call_chan + mech + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_att + + + false + + property-assign + systems/audio/acp[0]/call_chan + att + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_voice + + + false + + property-toggle + systems/audio/acp[0]/on_voice + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_vhf1 + + + false + + + property-toggle + controls/audio/acp[0]/vhf1-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/vhf1-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/vhf1-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_vhf2 + + + false + + + property-toggle + controls/audio/acp[0]/vhf2-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/vhf2-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/vhf2-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_vhf3 + + + false + + + property-toggle + controls/audio/acp[0]/vhf3-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/vhf3-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/vhf3-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_hf1 + + + false + + + property-toggle + controls/audio/acp[0]/hf1-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/hf1-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/hf1-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_hf2 + + + false + + + property-toggle + controls/audio/acp[0]/hf2-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/hf2-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/hf2-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_int + + + false + + + property-toggle + controls/audio/acp[0]/int-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/int-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/int-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_cab + + + false + + + property-toggle + controls/audio/acp[0]/cab-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/cab-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/cab-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_pa_rot + + + false + + + property-toggle + controls/audio/acp[0]/pa-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/pa-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/pa-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_vor1 + + + false + + + property-toggle + controls/audio/acp[0]/vor1-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/vor1-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/vor1-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_vor2 + + + false + + + property-toggle + controls/audio/acp[0]/vor2-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/vor2-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/vor2-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_mkr + + + false + + + property-toggle + controls/audio/acp[0]/mkr-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/mkr-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/mkr-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_ils + + + false + + + property-toggle + controls/audio/acp[0]/ils-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/ils-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/ils-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_mls + + + false + + + property-toggle + controls/audio/acp[0]/mls-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/mls-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/mls-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_adf1 + + + false + + + property-toggle + controls/audio/acp[0]/adf1-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/adf1-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/adf1-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_adf2 + + + false + + + property-toggle + controls/audio/acp[0]/adf2-recive + + + + + true + + + property-adjust + controls/audio/acp[0]/adf2-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[0]/adf2-volume + -0.05 + 0 + 1 + false + + + + + + + select + audio_vhf1_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[0]/call_chan + vhf1 + + + + + + + select + audio_vhf2_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[0]/call_chan + vhf2 + + + + + + + + select + audio_vhf3_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[0]/call_chan + vhf3 + + + + + + + + select + audio_hf1_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[0]/call_chan + hf1 + + + + + + + + select + audio_hf2_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[0]/call_chan + hf2 + + + + + + + + select + audio_mech_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[0]/call_chan + mech + + + + + + + + select + audio_att_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[0]/call_chan + att + + + + + + + + + select + audio_voice_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[0]/on_voice + 1 + + + + + + + + + translate + audio_vhf1 + controls/audio/acp[0]/vhf1-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_vhf1 + controls/audio/acp[0]/vhf1-volume + + 0-129 + 1129 + + + audio_vhf1.axis + + + + + translate + audio_vhf2 + controls/audio/acp[0]/vhf2-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_vhf2 + controls/audio/acp[0]/vhf2-volume + + 0-129 + 1129 + + + audio_vhf2.axis + + + + + translate + audio_vhf3 + controls/audio/acp[0]/vhf3-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_vhf3 + controls/audio/acp[0]/vhf3-volume + + 0-129 + 1129 + + + audio_vhf3.axis + + + + + translate + audio_hf1 + controls/audio/acp[0]/hf1-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_hf1 + controls/audio/acp[0]/hf1-volume + + 0-129 + 1129 + + + audio_hf1.axis + + + + + translate + audio_hf2 + controls/audio/acp[0]/hf2-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_hf2 + controls/audio/acp[0]/hf2-volume + + 0-129 + 1129 + + + audio_hf2.axis + + + + + translate + audio_int + controls/audio/acp[0]/int-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_int + controls/audio/acp[0]/int-volume + + 0-129 + 1129 + + + audio_int.axis + + + + + translate + audio_cab + controls/audio/acp[0]/cab-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_cab + controls/audio/acp[0]/cab-volume + + 0-129 + 1129 + + + audio_cab.axis + + + + + translate + audio_pa_rot + controls/audio/acp[0]/pa-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_pa_rot + controls/audio/acp[0]/pa-volume + + 0-129 + 1129 + + + audio_pa_rot.axis + + + + + translate + audio_vor1 + controls/audio/acp[0]/vor1-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_vor1 + controls/audio/acp[0]/vor1-volume + + 0-129 + 1129 + + + audio_vor1.axis + + + + + translate + audio_vor2 + controls/audio/acp[0]/vor2-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_vor2 + controls/audio/acp[0]/vor2-volume + + 0-129 + 1129 + + + audio_vor2.axis + + + + + translate + audio_mkr + controls/audio/acp[0]/mkr-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_mkr + controls/audio/acp[0]/mkr-volume + + 0-129 + 1129 + + + audio_mkr.axis + + + + + translate + audio_ils + controls/audio/acp[0]/ils-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_ils + controls/audio/acp[0]/ils-volume + + 0-129 + 1129 + + + audio_ils.axis + + + + + translate + audio_mls + controls/audio/acp[0]/mls-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_mls + controls/audio/acp[0]/mls-volume + + 0-129 + 1129 + + + audio_mls.axis + + + + + translate + audio_adf1 + controls/audio/acp[0]/adf1-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_adf1 + controls/audio/acp[0]/adf1-volume + + 0-129 + 1129 + + + audio_adf1.axis + + + + + translate + audio_adf2 + controls/audio/acp[0]/adf2-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_adf2 + controls/audio/acp[0]/adf2-volume + + 0-129 + 1129 + + + audio_adf2.axis + + + diff --git a/Models/Instruments/Audio/Audio2.xml b/Models/Instruments/Audio/Audio2.xml index a24ab8f1..5eaf3835 100644 --- a/Models/Instruments/Audio/Audio2.xml +++ b/Models/Instruments/Audio/Audio2.xml @@ -1,13 +1,1422 @@ res/Audio1.ac + + + + pick + audio_int_rad + + + + property-assign + controls/audio/acp[1]/int-rad + 2 + + + + + + property-assign + controls/audio/acp[1]/int-rad + 1 + + + + property-assign + controls/audio/acp[1]/int-rad + 0 + + + + + + rotate + audio_int_rad + controls/audio/acp[1]/int-rad + + + 0 + 0 + + + 1 + -20 + + + 2 + 20 + + + + audio_int_rad.axis + + + + + + pick + audio_pa + + + + property-assign + systems/audio/acp[1]/pa + 1 + + + + property-assign + systems/audio/acp[1]/pa + 0 + + + + + + select + audio_pa_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[1]/pa + 1 + + + + + + + + + pick + audio_call_vhf1 + + + false + + property-assign + systems/audio/acp[1]/call_chan + vhf1 + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_call_vhf2 + + + false + + property-assign + systems/audio/acp[1]/call_chan + vhf2 + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_call_vhf3 + + + false + + property-assign + systems/audio/acp[1]/call_chan + vhf3 + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_call_hf1 + + + false + + property-assign + systems/audio/acp[1]/call_chan + hf1 + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_call_hf2 + + + false + + property-assign + systems/audio/acp[1]/call_chan + hf2 + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_mech + + + false + + property-assign + systems/audio/acp[1]/call_chan + mech + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_att + + + false + + property-assign + systems/audio/acp[1]/call_chan + att + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_voice + + + false + + property-toggle + systems/audio/acp[1]/on_voice + + + systems/electrical/bus/dc-ess + 25 + + + + + + + + + pick + audio_vhf1 + + + false + + + property-toggle + controls/audio/acp[1]/vhf1-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/vhf1-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/vhf1-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_vhf2 + + + false + + + property-toggle + controls/audio/acp[1]/vhf2-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/vhf2-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/vhf2-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_vhf3 + + + false + + + property-toggle + controls/audio/acp[1]/vhf3-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/vhf3-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/vhf3-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_hf1 + + + false + + + property-toggle + controls/audio/acp[1]/hf1-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/hf1-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/hf1-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_hf2 + + + false + + + property-toggle + controls/audio/acp[1]/hf2-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/hf2-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/hf2-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_int + + + false + + + property-toggle + controls/audio/acp[1]/int-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/int-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/int-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_cab + + + false + + + property-toggle + controls/audio/acp[1]/cab-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/cab-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/cab-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_pa_rot + + + false + + + property-toggle + controls/audio/acp[1]/pa-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/pa-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/pa-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_vor1 + + + false + + + property-toggle + controls/audio/acp[1]/vor1-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/vor1-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/vor1-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_vor2 + + + false + + + property-toggle + controls/audio/acp[1]/vor2-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/vor2-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/vor2-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_mkr + + + false + + + property-toggle + controls/audio/acp[1]/mkr-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/mkr-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/mkr-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_ils + + + false + + + property-toggle + controls/audio/acp[1]/ils-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/ils-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/ils-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_mls + + + false + + + property-toggle + controls/audio/acp[1]/mls-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/mls-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/mls-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_adf1 + + + false + + + property-toggle + controls/audio/acp[1]/adf1-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/adf1-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/adf1-volume + -0.05 + 0 + 1 + false + + + + + + pick + audio_adf2 + + + false + + + property-toggle + controls/audio/acp[1]/adf2-recive + + + + + true + + + property-adjust + controls/audio/acp[1]/adf2-volume + 0.05 + 0 + 1 + false + + + + + true + + + property-adjust + controls/audio/acp[1]/adf2-volume + -0.05 + 0 + 1 + false + + + + + + + select + audio_vhf1_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[1]/call_chan + vhf1 + + + + + + + select + audio_vhf2_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[1]/call_chan + vhf2 + + + + + + + + select + audio_vhf3_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[1]/call_chan + vhf3 + + + + + + + + select + audio_hf1_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[1]/call_chan + hf1 + + + + + + + + select + audio_hf2_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[1]/call_chan + hf2 + + + + + + + + select + audio_mech_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[1]/call_chan + mech + + + + + + + + select + audio_att_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[1]/call_chan + att + + + + + + + + + select + audio_voice_led + + + + controls/switches/annun-test + 1 + + + + systems/electrical/bus/dc-ess + 25 + + + systems/audio/acp[1]/on_voice + 1 + + + + + + + + + translate + audio_vhf1 + controls/audio/acp[1]/vhf1-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_vhf1 + controls/audio/acp[1]/vhf1-volume + + 0-129 + 1129 + + + audio_vhf1.axis + + + + + translate + audio_vhf2 + controls/audio/acp[1]/vhf2-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_vhf2 + controls/audio/acp[1]/vhf2-volume + + 0-129 + 1129 + + + audio_vhf2.axis + + + + + translate + audio_vhf3 + controls/audio/acp[1]/vhf3-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_vhf3 + controls/audio/acp[1]/vhf3-volume + + 0-129 + 1129 + + + audio_vhf3.axis + + + + + translate + audio_hf1 + controls/audio/acp[1]/hf1-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_hf1 + controls/audio/acp[1]/hf1-volume + + 0-129 + 1129 + + + audio_hf1.axis + + + + + translate + audio_hf2 + controls/audio/acp[1]/hf2-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_hf2 + controls/audio/acp[1]/hf2-volume + + 0-129 + 1129 + + + audio_hf2.axis + + + + + translate + audio_int + controls/audio/acp[1]/int-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_int + controls/audio/acp[1]/int-volume + + 0-129 + 1129 + + + audio_int.axis + + + + + translate + audio_cab + controls/audio/acp[1]/cab-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_cab + controls/audio/acp[1]/cab-volume + + 0-129 + 1129 + + + audio_cab.axis + + + + + translate + audio_pa_rot + controls/audio/acp[1]/pa-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_pa_rot + controls/audio/acp[1]/pa-volume + + 0-129 + 1129 + + + audio_pa_rot.axis + + + + + translate + audio_vor1 + controls/audio/acp[1]/vor1-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_vor1 + controls/audio/acp[1]/vor1-volume + + 0-129 + 1129 + + + audio_vor1.axis + + + + + translate + audio_vor2 + controls/audio/acp[1]/vor2-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_vor2 + controls/audio/acp[1]/vor2-volume + + 0-129 + 1129 + + + audio_vor2.axis + + + + + translate + audio_mkr + controls/audio/acp[1]/mkr-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_mkr + controls/audio/acp[1]/mkr-volume + + 0-129 + 1129 + + + audio_mkr.axis + + + + + translate + audio_ils + controls/audio/acp[1]/ils-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_ils + controls/audio/acp[1]/ils-volume + + 0-129 + 1129 + + + audio_ils.axis + + + + + translate + audio_mls + controls/audio/acp[1]/mls-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_mls + controls/audio/acp[1]/mls-volume + + 0-129 + 1129 + + + audio_mls.axis + + + + + translate + audio_adf1 + controls/audio/acp[1]/adf1-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_adf1 + controls/audio/acp[1]/adf1-volume + + 0-129 + 1129 + + + audio_adf1.axis + + + + + translate + audio_adf2 + controls/audio/acp[1]/adf2-recive + 0.01 + + 0 + 0 + 1 + + + + rotate + audio_adf2 + controls/audio/acp[1]/adf2-volume + + 0-129 + 1129 + + + audio_adf2.axis + + + diff --git a/Nasal/acp.nas b/Nasal/acp.nas new file mode 100644 index 00000000..6b44ca14 --- /dev/null +++ b/Nasal/acp.nas @@ -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); +}); diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas index a9dfecbf..a8b6ae37 100644 --- a/Nasal/libraries.nas +++ b/Nasal/libraries.nas @@ -192,6 +192,7 @@ var systemsInit = func { libraries.BUTTONS.init(); libraries.variousReset(); rmp.init(); + acp.init(); } setlistener("/sim/signals/fdm-initialized", func {