Merge branch 'master' into mcdu
This commit is contained in:
commit
b02df6331f
16 changed files with 82023 additions and 60837 deletions
|
@ -157,29 +157,6 @@
|
||||||
|
|
||||||
<instrumentation>
|
<instrumentation>
|
||||||
<path>Aircraft/IDG-A32X/Systems/instrumentation.xml</path>
|
<path>Aircraft/IDG-A32X/Systems/instrumentation.xml</path>
|
||||||
<adirs n="0">
|
|
||||||
<ir n="0">
|
|
||||||
<aligned type="bool">false</aligned>
|
|
||||||
<display>
|
|
||||||
<status type="string"></status>
|
|
||||||
<ttn type="int">0</ttn>
|
|
||||||
</display>
|
|
||||||
</ir>
|
|
||||||
<ir n="1">
|
|
||||||
<aligned type="bool">false</aligned>
|
|
||||||
<display>
|
|
||||||
<status type="string"></status>
|
|
||||||
<ttn type="int">0</ttn>
|
|
||||||
</display>
|
|
||||||
</ir>
|
|
||||||
<ir n="2">
|
|
||||||
<aligned type="bool">false</aligned>
|
|
||||||
<display>
|
|
||||||
<status type="string"></status>
|
|
||||||
<ttn type="int">0</ttn>
|
|
||||||
</display>
|
|
||||||
</ir>
|
|
||||||
</adirs>
|
|
||||||
</instrumentation>
|
</instrumentation>
|
||||||
|
|
||||||
<alarms>
|
<alarms>
|
||||||
|
|
|
@ -151,11 +151,11 @@ saveSettings();
|
||||||
|
|
||||||
var systemsReset = func {
|
var systemsReset = func {
|
||||||
fbw.fctlInit();
|
fbw.fctlInit();
|
||||||
systems.elec_init();
|
systems.ELEC.init();
|
||||||
systems.ADIRSreset();
|
systems.PNEU.init();
|
||||||
systems.pneu_init();
|
systems.HYD.init();
|
||||||
systems.hyd_init();
|
systems.FUEL.init();
|
||||||
systems.fuel_init();
|
systems.ADIRS.init();
|
||||||
systems.eng_init();
|
systems.eng_init();
|
||||||
systems.autobrake_init();
|
systems.autobrake_init();
|
||||||
fmgc.FMGCinit();
|
fmgc.FMGCinit();
|
||||||
|
@ -290,12 +290,9 @@ var beforestart_b = func {
|
||||||
setprop("controls/adirs/ir[0]/knob","2");
|
setprop("controls/adirs/ir[0]/knob","2");
|
||||||
setprop("controls/adirs/ir[1]/knob","2");
|
setprop("controls/adirs/ir[1]/knob","2");
|
||||||
setprop("controls/adirs/ir[2]/knob","2");
|
setprop("controls/adirs/ir[2]/knob","2");
|
||||||
setprop("instrumentation/adirs/ir[0]/display/ttn",0);
|
systems.ADIRS.skip(0);
|
||||||
setprop("instrumentation/adirs/ir[1]/display/ttn",0);
|
systems.ADIRS.skip(1);
|
||||||
setprop("instrumentation/adirs/ir[2]/display/ttn",0);
|
systems.ADIRS.skip(2);
|
||||||
setprop("instrumentation/adirs/ir[0]/aligned",1);
|
|
||||||
setprop("instrumentation/adirs/ir[1]/aligned",1);
|
|
||||||
setprop("instrumentation/adirs/ir[2]/aligned",1);
|
|
||||||
setprop("/controls/adirs/mcducbtn", 1);
|
setprop("/controls/adirs/mcducbtn", 1);
|
||||||
setprop("/controls/lighting/beacon", 1);
|
setprop("/controls/lighting/beacon", 1);
|
||||||
setprop("/controls/lighting/nav-lights-switch", 1);
|
setprop("/controls/lighting/nav-lights-switch", 1);
|
||||||
|
@ -367,12 +364,9 @@ var taxi_b = func {
|
||||||
setprop("controls/adirs/ir[0]/knob","2");
|
setprop("controls/adirs/ir[0]/knob","2");
|
||||||
setprop("controls/adirs/ir[1]/knob","2");
|
setprop("controls/adirs/ir[1]/knob","2");
|
||||||
setprop("controls/adirs/ir[2]/knob","2");
|
setprop("controls/adirs/ir[2]/knob","2");
|
||||||
setprop("instrumentation/adirs/ir[0]/display/ttn",0);
|
systems.ADIRS.skip(0);
|
||||||
setprop("instrumentation/adirs/ir[1]/display/ttn",0);
|
systems.ADIRS.skip(1);
|
||||||
setprop("instrumentation/adirs/ir[2]/display/ttn",0);
|
systems.ADIRS.skip(2);
|
||||||
setprop("instrumentation/adirs/ir[0]/aligned",1);
|
|
||||||
setprop("instrumentation/adirs/ir[1]/aligned",1);
|
|
||||||
setprop("instrumentation/adirs/ir[2]/aligned",1);
|
|
||||||
setprop("/controls/adirs/mcducbtn", 1);
|
setprop("/controls/adirs/mcducbtn", 1);
|
||||||
setprop("/controls/lighting/beacon", 1);
|
setprop("/controls/lighting/beacon", 1);
|
||||||
setprop("/controls/lighting/nav-lights-switch", 1);
|
setprop("/controls/lighting/nav-lights-switch", 1);
|
||||||
|
|
|
@ -26,15 +26,28 @@
|
||||||
<animation>
|
<animation>
|
||||||
<type>select</type>
|
<type>select</type>
|
||||||
<object-name>hud</object-name>
|
<object-name>hud</object-name>
|
||||||
|
<object-name>hud_box</object-name>
|
||||||
<object-name>hud_brt</object-name>
|
<object-name>hud_brt</object-name>
|
||||||
|
<object-name>hud_brt.axis</object-name>
|
||||||
<object-name>hud_norm_sw</object-name>
|
<object-name>hud_norm_sw</object-name>
|
||||||
<object-name>hud_declutter_btn</object-name>
|
<object-name>hud_declutter_btn</object-name>
|
||||||
|
<object-name>hud_ceiling</object-name>
|
||||||
<object-name>fcu_labels_hud</object-name>
|
<object-name>fcu_labels_hud</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<property>options/enable-hud</property>
|
<property>options/enable-hud</property>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>select</type>
|
||||||
|
<object-name>visor_glass_cpt</object-name>
|
||||||
|
<object-name>visor_cpt</object-name>
|
||||||
|
<object-name>cpit_lamp_cpt</object-name>
|
||||||
|
<condition>
|
||||||
|
<not><property>options/enable-hud</property></not>
|
||||||
|
</condition>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<!-- WIP ;) -->
|
<!-- WIP ;) -->
|
||||||
<!--model>
|
<!--model>
|
||||||
<path>Aircraft/IDG-A32X/Models/Tablet/Tablet.xml</path>
|
<path>Aircraft/IDG-A32X/Models/Tablet/Tablet.xml</path>
|
||||||
|
@ -337,6 +350,22 @@
|
||||||
<object-name>dec_low_on</object-name>
|
<object-name>dec_low_on</object-name>
|
||||||
<object-name>dec_med_on</object-name>
|
<object-name>dec_med_on</object-name>
|
||||||
<object-name>dec_max_on</object-name>
|
<object-name>dec_max_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>exped_led</object-name>
|
||||||
<object-name>fcu_screen</object-name>
|
<object-name>fcu_screen</object-name>
|
||||||
<object-name>fd1_led</object-name>
|
<object-name>fd1_led</object-name>
|
||||||
|
@ -392,6 +421,22 @@
|
||||||
<type>select</type>
|
<type>select</type>
|
||||||
<object-name>alt-text-test</object-name>
|
<object-name>alt-text-test</object-name>
|
||||||
<object-name>autoland_light_on</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>exped_led</object-name>
|
||||||
<object-name>hdg-text-test</object-name>
|
<object-name>hdg-text-test</object-name>
|
||||||
<object-name>master_caution_on</object-name>
|
<object-name>master_caution_on</object-name>
|
||||||
|
@ -826,7 +871,7 @@
|
||||||
<animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
<object-name>pfd_brt_cpt</object-name>
|
<object-name>pfd_brt_cpt</object-name>
|
||||||
<object-name>pfd_brt_cpt_mark</object-name>
|
<object-name>pfd_brt_cpt.mark</object-name>
|
||||||
<action>
|
<action>
|
||||||
<button>0</button>
|
<button>0</button>
|
||||||
<button>3</button>
|
<button>3</button>
|
||||||
|
@ -853,7 +898,6 @@
|
||||||
<animation>
|
<animation>
|
||||||
<type>rotate</type>
|
<type>rotate</type>
|
||||||
<object-name>pfd_brt_cpt</object-name>
|
<object-name>pfd_brt_cpt</object-name>
|
||||||
<object-name>pfd_brt_cpt_mark</object-name>
|
|
||||||
<property>controls/lighting/DU/du1</property>
|
<property>controls/lighting/DU/du1</property>
|
||||||
<interpolation>
|
<interpolation>
|
||||||
<entry><ind>0</ind><dep>-129</dep></entry>
|
<entry><ind>0</ind><dep>-129</dep></entry>
|
||||||
|
@ -891,7 +935,7 @@
|
||||||
<animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
<object-name>brightness_nd_2_cpt</object-name>
|
<object-name>brightness_nd_2_cpt</object-name>
|
||||||
<object-name>brightness_nd_2_cpt_mark</object-name>
|
<object-name>brightness_nd_2_cpt.mark</object-name>
|
||||||
<action>
|
<action>
|
||||||
<button>0</button>
|
<button>0</button>
|
||||||
<button>3</button>
|
<button>3</button>
|
||||||
|
@ -918,7 +962,6 @@
|
||||||
<animation>
|
<animation>
|
||||||
<type>rotate</type>
|
<type>rotate</type>
|
||||||
<object-name>brightness_nd_2_cpt</object-name>
|
<object-name>brightness_nd_2_cpt</object-name>
|
||||||
<object-name>brightness_nd_2_cpt_mark</object-name>
|
|
||||||
<property>controls/lighting/DU/du2</property>
|
<property>controls/lighting/DU/du2</property>
|
||||||
<interpolation>
|
<interpolation>
|
||||||
<entry><ind>0</ind><dep>-129</dep></entry>
|
<entry><ind>0</ind><dep>-129</dep></entry>
|
||||||
|
@ -933,7 +976,7 @@
|
||||||
<animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
<object-name>brightness_nd_2_fo</object-name>
|
<object-name>brightness_nd_2_fo</object-name>
|
||||||
<object-name>brightness_nd_2_fo_mark</object-name>
|
<object-name>brightness_nd_2_fo.mark</object-name>
|
||||||
<action>
|
<action>
|
||||||
<button>0</button>
|
<button>0</button>
|
||||||
<button>3</button>
|
<button>3</button>
|
||||||
|
@ -960,7 +1003,6 @@
|
||||||
<animation>
|
<animation>
|
||||||
<type>rotate</type>
|
<type>rotate</type>
|
||||||
<object-name>brightness_nd_2_fo</object-name>
|
<object-name>brightness_nd_2_fo</object-name>
|
||||||
<object-name>brightness_nd_2_fo_mark</object-name>
|
|
||||||
<property>controls/lighting/DU/du5</property>
|
<property>controls/lighting/DU/du5</property>
|
||||||
<interpolation>
|
<interpolation>
|
||||||
<entry><ind>0</ind><dep>-129</dep></entry>
|
<entry><ind>0</ind><dep>-129</dep></entry>
|
||||||
|
@ -998,7 +1040,7 @@
|
||||||
<animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
<object-name>pfd_brt_fo</object-name>
|
<object-name>pfd_brt_fo</object-name>
|
||||||
<object-name>pfd_brt_fo_mark</object-name>
|
<object-name>pfd_brt_fo.mark</object-name>
|
||||||
<action>
|
<action>
|
||||||
<button>0</button>
|
<button>0</button>
|
||||||
<button>3</button>
|
<button>3</button>
|
||||||
|
@ -1025,7 +1067,6 @@
|
||||||
<animation>
|
<animation>
|
||||||
<type>rotate</type>
|
<type>rotate</type>
|
||||||
<object-name>pfd_brt_fo</object-name>
|
<object-name>pfd_brt_fo</object-name>
|
||||||
<object-name>pfd_brt_fo_mark</object-name>
|
|
||||||
<property>controls/lighting/DU/du6</property>
|
<property>controls/lighting/DU/du6</property>
|
||||||
<interpolation>
|
<interpolation>
|
||||||
<entry><ind>0</ind><dep>-129</dep></entry>
|
<entry><ind>0</ind><dep>-129</dep></entry>
|
||||||
|
@ -1037,6 +1078,86 @@
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
<!-- ECAM Controls -->
|
<!-- ECAM Controls -->
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>ecam_brt_upper</object-name>
|
||||||
|
<object-name>ecam_brt_upper.mark</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<button>3</button>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>controls/lighting/DU/du3</property>
|
||||||
|
<step>0.05</step>
|
||||||
|
<max>1</max>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
<action>
|
||||||
|
<button>1</button>
|
||||||
|
<button>4</button>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>controls/lighting/DU/du3</property>
|
||||||
|
<step>-0.05</step>
|
||||||
|
<min>0</min>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
<animation>
|
||||||
|
<type>rotate</type>
|
||||||
|
<object-name>ecam_brt_upper</object-name>
|
||||||
|
<property>controls/lighting/DU/du3</property>
|
||||||
|
<interpolation>
|
||||||
|
<entry><ind>0</ind><dep>-129</dep></entry>
|
||||||
|
<entry><ind>1</ind><dep>129</dep></entry>
|
||||||
|
</interpolation>
|
||||||
|
<axis>
|
||||||
|
<object-name>ecam_brt_upper.axis</object-name>
|
||||||
|
</axis>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>ecam_brt_lower</object-name>
|
||||||
|
<object-name>ecam_brt_lower.mark</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<button>3</button>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>controls/lighting/DU/du4</property>
|
||||||
|
<step>0.05</step>
|
||||||
|
<max>1</max>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
<action>
|
||||||
|
<button>1</button>
|
||||||
|
<button>4</button>
|
||||||
|
<repeatable>true</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>property-adjust</command>
|
||||||
|
<property>controls/lighting/DU/du4</property>
|
||||||
|
<step>-0.05</step>
|
||||||
|
<min>0</min>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
<animation>
|
||||||
|
<type>rotate</type>
|
||||||
|
<object-name>ecam_brt_lower</object-name>
|
||||||
|
<property>controls/lighting/DU/du4</property>
|
||||||
|
<interpolation>
|
||||||
|
<entry><ind>0</ind><dep>-129</dep></entry>
|
||||||
|
<entry><ind>1</ind><dep>129</dep></entry>
|
||||||
|
</interpolation>
|
||||||
|
<axis>
|
||||||
|
<object-name>ecam_brt_lower.axis</object-name>
|
||||||
|
</axis>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
<object-name>ecam_sts</object-name>
|
<object-name>ecam_sts</object-name>
|
||||||
|
@ -4784,21 +4905,15 @@
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
<!-- FIXME: Thorsten H please check these coords or create a rotate axis -->
|
<animation>
|
||||||
<!--animation>
|
|
||||||
<type>rotate</type>
|
<type>rotate</type>
|
||||||
<object-name>fcu_integ_knb</object-name>
|
<object-name>fcu_integ_knb</object-name>
|
||||||
<property>controls/lighting/fcu-panel-knb</property>
|
<property>controls/lighting/fcu-panel-knb</property>
|
||||||
<factor>10</factor>
|
<factor>10</factor>
|
||||||
<axis>
|
<axis>
|
||||||
<x1-m>-0.45533</x1-m>
|
<object-name>fcu_integ_knb.axis</object-name>
|
||||||
<y1-m>-0.0688</y1-m>
|
|
||||||
<z1-m>0.38539</z1-m>
|
|
||||||
<x2-m>-0.45035</x2-m>
|
|
||||||
<y2-m>-0.0688</y2-m>
|
|
||||||
<z2-m>0.37494</z2-m>
|
|
||||||
</axis>
|
</axis>
|
||||||
</animation-->
|
</animation>
|
||||||
|
|
||||||
<animation>
|
<animation>
|
||||||
<name>Main Panel lighting</name>
|
<name>Main Panel lighting</name>
|
||||||
|
@ -4816,9 +4931,29 @@
|
||||||
<object-name>flaps_scale</object-name>
|
<object-name>flaps_scale</object-name>
|
||||||
<object-name>gear_lever_label</object-name>
|
<object-name>gear_lever_label</object-name>
|
||||||
<object-name>flood_lt_main.mark</object-name>
|
<object-name>flood_lt_main.mark</object-name>
|
||||||
<object-name>flood_lt_ped_mark</object-name>
|
<object-name>flood_lt_ped.mark</object-name>
|
||||||
<object-name>integ_lt.mark</object-name>
|
<object-name>integ_lt.mark</object-name>
|
||||||
<object-name>eng_mode_mark</object-name>
|
<object-name>eng_mode.mark</object-name>
|
||||||
|
<object-name>RudderTrim.mark</object-name>
|
||||||
|
<object-name>ecam_att_hdg_sw.mark</object-name>
|
||||||
|
<object-name>ecam_air_data_sw.mark</object-name>
|
||||||
|
<object-name>ecam_brt_upper.mark</object-name>
|
||||||
|
<object-name>ecam_brt_lower.mark</object-name>
|
||||||
|
<object-name>ecam_eis_dmc_sw.mark</object-name>
|
||||||
|
<object-name>ecam_glare</object-name>
|
||||||
|
<object-name>ecam_nd_xfr_sw.mark</object-name>
|
||||||
|
<object-name>pfd_brt_cpt.mark</object-name>
|
||||||
|
<object-name>speaker_volume_cpt.mark</object-name>
|
||||||
|
<object-name>light_console_cpt_sw.mark</object-name>
|
||||||
|
<object-name>foot_warmer_cpt_sw.mark</object-name>
|
||||||
|
<object-name>brightness_nd_2_cpt.mark</object-name>
|
||||||
|
<object-name>brightness_nd_1_cpt.mark</object-name>
|
||||||
|
<object-name>pfd_brt_fo.mark</object-name>
|
||||||
|
<object-name>speaker_volume_fo.mark</object-name>
|
||||||
|
<object-name>light_console_fo_sw.mark</object-name>
|
||||||
|
<object-name>foot_warmer_fo_sw.mark</object-name>
|
||||||
|
<object-name>brightness_nd_2_fo.mark</object-name>
|
||||||
|
<object-name>brightness_nd_1_fo.mark</object-name>
|
||||||
<emission>
|
<emission>
|
||||||
<red>1</red>
|
<red>1</red>
|
||||||
<green>0.725</green>
|
<green>0.725</green>
|
||||||
|
@ -4833,11 +4968,11 @@
|
||||||
<object-name>fcu_labels</object-name>
|
<object-name>fcu_labels</object-name>
|
||||||
<object-name>fcu_labels_hud</object-name>
|
<object-name>fcu_labels_hud</object-name>
|
||||||
<object-name>fcu_panel_emit</object-name>
|
<object-name>fcu_panel_emit</object-name>
|
||||||
<object-name>nd_mode_mark</object-name>
|
<object-name>nd_mode.mark</object-name>
|
||||||
<object-name>nd_range_mark</object-name>
|
<object-name>nd_range.mark</object-name>
|
||||||
<object-name>nd_mode_fo_mark</object-name>
|
<object-name>nd_mode_fo.mark</object-name>
|
||||||
<object-name>nd_range_fo_mark</object-name>
|
<object-name>nd_range_fo.mark</object-name>
|
||||||
<object-name>hud_brt_mark</object-name>
|
<object-name>hud_brt.mark</object-name>
|
||||||
<emission>
|
<emission>
|
||||||
<red>1</red>
|
<red>1</red>
|
||||||
<green>0.725</green>
|
<green>0.725</green>
|
||||||
|
@ -5757,39 +5892,4 @@
|
||||||
</emission>
|
</emission>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
<!--effect>
|
|
||||||
<inherits-from>Models/Effects/IDG-A32X-interior</inherits-from>
|
|
||||||
<object-name>fcu_panel</object-name>
|
|
||||||
<object-name>main_panel</object-name>
|
|
||||||
<object-name>ped_labels_1</object-name>
|
|
||||||
<object-name>ped_labels_2</object-name>
|
|
||||||
<object-name>carpet</object-name>
|
|
||||||
<object-name>so.1</object-name>
|
|
||||||
<object-name>sts.002</object-name>
|
|
||||||
<object-name>Seat</object-name>
|
|
||||||
<object-name>beam_a</object-name>
|
|
||||||
<object-name>beam_f</object-name>
|
|
||||||
<object-name>wall_1</object-name>
|
|
||||||
<object-name>seat3.001</object-name>
|
|
||||||
<object-name>seat4.002</object-name>
|
|
||||||
<object-name>pedal_adjust</object-name>
|
|
||||||
<object-name>pedals_block_capt</object-name>
|
|
||||||
<object-name>ped_surface</object-name>
|
|
||||||
<object-name>ped_wf</object-name>
|
|
||||||
<object-name>pedestal1</object-name>
|
|
||||||
<object-name>pedestal2</object-name>
|
|
||||||
<object-name>pedestal3</object-name>
|
|
||||||
<object-name>sfl</object-name>
|
|
||||||
<object-name>sfl.003</object-name>
|
|
||||||
<object-name>sts</object-name>
|
|
||||||
<object-name>sfl.001</object-name>
|
|
||||||
<object-name>sts.003</object-name>
|
|
||||||
<object-name>sts.001</object-name>
|
|
||||||
<object-name>speaker_front</object-name>
|
|
||||||
<object-name>efis_box_1</object-name>
|
|
||||||
<object-name>efis_box_2</object-name>
|
|
||||||
<object-name>efis_box_3</object-name>
|
|
||||||
<object-name>efis_box_4</object-name>
|
|
||||||
</effect--><!-- Makes lag -->
|
|
||||||
|
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
BIN
Models/FlightDeck/res/ecam_glare.png
Normal file
BIN
Models/FlightDeck/res/ecam_glare.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
Models/FlightDeck/res/ecam_panel.png
Normal file
BIN
Models/FlightDeck/res/ecam_panel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
File diff suppressed because it is too large
Load diff
|
@ -519,10 +519,9 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-cycle</command>
|
<command>property-cycle</command>
|
||||||
<property>controls/adirs/ir[0]/knob</property>
|
<property>controls/adirs/ir[0]/knob</property>
|
||||||
|
<value>0</value>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
<value>3</value>
|
|
||||||
<max>3</max>
|
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
|
@ -536,10 +535,9 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-cycle</command>
|
<command>property-cycle</command>
|
||||||
<property>controls/adirs/ir[0]/knob</property>
|
<property>controls/adirs/ir[0]/knob</property>
|
||||||
<value>3</value>
|
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
<min>1</min>
|
<value>0</value>
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
|
@ -553,9 +551,9 @@
|
||||||
<object-name>IR1ModeKnb</object-name>
|
<object-name>IR1ModeKnb</object-name>
|
||||||
<property>controls/adirs/ir[0]/knob</property>
|
<property>controls/adirs/ir[0]/knob</property>
|
||||||
<interpolation>
|
<interpolation>
|
||||||
<entry><ind>1</ind><dep>-35</dep></entry>
|
<entry><ind>0</ind><dep>-35</dep></entry>
|
||||||
<entry><ind>2</ind><dep>0</dep></entry>
|
<entry><ind>1</ind><dep>0</dep></entry>
|
||||||
<entry><ind>3</ind><dep>35</dep></entry>
|
<entry><ind>2</ind><dep>35</dep></entry>
|
||||||
</interpolation>
|
</interpolation>
|
||||||
<axis>
|
<axis>
|
||||||
<x1-m>0.01578</x1-m>
|
<x1-m>0.01578</x1-m>
|
||||||
|
@ -611,10 +609,9 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-cycle</command>
|
<command>property-cycle</command>
|
||||||
<property>controls/adirs/ir[1]/knob</property>
|
<property>controls/adirs/ir[1]/knob</property>
|
||||||
|
<value>0</value>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
<value>3</value>
|
|
||||||
<max>3</max>
|
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
|
@ -628,10 +625,9 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-cycle</command>
|
<command>property-cycle</command>
|
||||||
<property>controls/adirs/ir[1]/knob</property>
|
<property>controls/adirs/ir[1]/knob</property>
|
||||||
<value>3</value>
|
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
<min>1</min>
|
<value>0</value>
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
|
@ -645,9 +641,9 @@
|
||||||
<object-name>IR2ModeKnb</object-name>
|
<object-name>IR2ModeKnb</object-name>
|
||||||
<property>controls/adirs/ir[1]/knob</property>
|
<property>controls/adirs/ir[1]/knob</property>
|
||||||
<interpolation>
|
<interpolation>
|
||||||
<entry><ind>1</ind><dep>-35</dep></entry>
|
<entry><ind>0</ind><dep>-35</dep></entry>
|
||||||
<entry><ind>2</ind><dep>0</dep></entry>
|
<entry><ind>1</ind><dep>0</dep></entry>
|
||||||
<entry><ind>3</ind><dep>35</dep></entry>
|
<entry><ind>2</ind><dep>35</dep></entry>
|
||||||
</interpolation>
|
</interpolation>
|
||||||
<axis>
|
<axis>
|
||||||
<x1-m>0.00444</x1-m>
|
<x1-m>0.00444</x1-m>
|
||||||
|
@ -703,10 +699,9 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-cycle</command>
|
<command>property-cycle</command>
|
||||||
<property>controls/adirs/ir[2]/knob</property>
|
<property>controls/adirs/ir[2]/knob</property>
|
||||||
|
<value>0</value>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
<value>3</value>
|
|
||||||
<max>3</max>
|
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
|
@ -720,10 +715,9 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-cycle</command>
|
<command>property-cycle</command>
|
||||||
<property>controls/adirs/ir[2]/knob</property>
|
<property>controls/adirs/ir[2]/knob</property>
|
||||||
<value>3</value>
|
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
<min>1</min>
|
<value>0</value>
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
|
@ -737,9 +731,9 @@
|
||||||
<object-name>IR3ModeKnb</object-name>
|
<object-name>IR3ModeKnb</object-name>
|
||||||
<property>controls/adirs/ir[2]/knob</property>
|
<property>controls/adirs/ir[2]/knob</property>
|
||||||
<interpolation>
|
<interpolation>
|
||||||
<entry><ind>1</ind><dep>-35</dep></entry>
|
<entry><ind>0</ind><dep>-35</dep></entry>
|
||||||
<entry><ind>2</ind><dep>0</dep></entry>
|
<entry><ind>1</ind><dep>0</dep></entry>
|
||||||
<entry><ind>3</ind><dep>35</dep></entry>
|
<entry><ind>2</ind><dep>35</dep></entry>
|
||||||
</interpolation>
|
</interpolation>
|
||||||
<axis>
|
<axis>
|
||||||
<x1-m>0.01021</x1-m>
|
<x1-m>0.01021</x1-m>
|
||||||
|
|
|
@ -64,6 +64,9 @@ setprop("/it-autoflight/internal/vert-speed-fpm-pfd", 0);
|
||||||
setprop("/position/gear-agl-ft", 0);
|
setprop("/position/gear-agl-ft", 0);
|
||||||
setprop("/controls/flight/aileron-input-fast", 0);
|
setprop("/controls/flight/aileron-input-fast", 0);
|
||||||
setprop("/controls/flight/elevator-input-fast", 0);
|
setprop("/controls/flight/elevator-input-fast", 0);
|
||||||
|
setprop("/instrumentation/adirs/adr[0]/active", 0);
|
||||||
|
setprop("/instrumentation/adirs/adr[1]/active", 0);
|
||||||
|
setprop("/instrumentation/adirs/adr[2]/active", 0);
|
||||||
setprop("/instrumentation/adirs/ir[0]/aligned", 0);
|
setprop("/instrumentation/adirs/ir[0]/aligned", 0);
|
||||||
setprop("/instrumentation/adirs/ir[1]/aligned", 0);
|
setprop("/instrumentation/adirs/ir[1]/aligned", 0);
|
||||||
setprop("/instrumentation/adirs/ir[2]/aligned", 0);
|
setprop("/instrumentation/adirs/ir[2]/aligned", 0);
|
||||||
|
@ -728,37 +731,41 @@ var canvas_PFD_1 = {
|
||||||
wow2 = getprop("/gear/gear[2]/wow");
|
wow2 = getprop("/gear/gear[2]/wow");
|
||||||
|
|
||||||
# Errors
|
# Errors
|
||||||
if (getprop("/instrumentation/adirs/ir[0]/aligned") == 1) {
|
if (getprop("/instrumentation/adirs/adr[0]/active") == 1) {
|
||||||
me["ASI_group"].show();
|
me["ASI_group"].show();
|
||||||
me["AI_group"].show();
|
|
||||||
me["ALT_group"].show();
|
me["ALT_group"].show();
|
||||||
me["ALT_group2"].show();
|
me["ALT_group2"].show();
|
||||||
me["ALT_scale"].show();
|
me["ALT_scale"].show();
|
||||||
me["VS_group"].show();
|
me["VS_group"].show();
|
||||||
me["HDG_group"].show();
|
|
||||||
me["ASI_error"].hide();
|
me["ASI_error"].hide();
|
||||||
me["ASI_frame"].setColor(1,1,1);
|
me["ASI_frame"].setColor(1,1,1);
|
||||||
me["AI_error"].hide();
|
|
||||||
me["ALT_error"].hide();
|
me["ALT_error"].hide();
|
||||||
me["ALT_frame"].setColor(1,1,1);
|
me["ALT_frame"].setColor(1,1,1);
|
||||||
me["VS_error"].hide();
|
me["VS_error"].hide();
|
||||||
me["HDG_error"].hide();
|
|
||||||
me["HDG_frame"].setColor(1,1,1);
|
|
||||||
} else {
|
} else {
|
||||||
me["ASI_error"].show();
|
me["ASI_error"].show();
|
||||||
me["ASI_frame"].setColor(1,0,0);
|
me["ASI_frame"].setColor(1,0,0);
|
||||||
me["AI_error"].show();
|
|
||||||
me["ALT_error"].show();
|
me["ALT_error"].show();
|
||||||
me["ALT_frame"].setColor(1,0,0);
|
me["ALT_frame"].setColor(1,0,0);
|
||||||
me["VS_error"].show();
|
me["VS_error"].show();
|
||||||
me["HDG_error"].show();
|
|
||||||
me["HDG_frame"].setColor(1,0,0);
|
|
||||||
me["ASI_group"].hide();
|
me["ASI_group"].hide();
|
||||||
me["AI_group"].hide();
|
|
||||||
me["ALT_group"].hide();
|
me["ALT_group"].hide();
|
||||||
me["ALT_group2"].hide();
|
me["ALT_group2"].hide();
|
||||||
me["ALT_scale"].hide();
|
me["ALT_scale"].hide();
|
||||||
me["VS_group"].hide();
|
me["VS_group"].hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getprop("/instrumentation/adirs/ir[0]/aligned") == 1) {
|
||||||
|
me["AI_group"].show();
|
||||||
|
me["HDG_group"].show();
|
||||||
|
me["AI_error"].hide();
|
||||||
|
me["HDG_error"].hide();
|
||||||
|
me["HDG_frame"].setColor(1,1,1);
|
||||||
|
} else {
|
||||||
|
me["AI_error"].show();
|
||||||
|
me["HDG_error"].show();
|
||||||
|
me["HDG_frame"].setColor(1,0,0);
|
||||||
|
me["AI_group"].hide();
|
||||||
me["HDG_group"].hide();
|
me["HDG_group"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,37 +824,41 @@ var canvas_PFD_2 = {
|
||||||
wow2 = getprop("/gear/gear[2]/wow");
|
wow2 = getprop("/gear/gear[2]/wow");
|
||||||
|
|
||||||
# Errors
|
# Errors
|
||||||
if (getprop("/instrumentation/adirs/ir[1]/aligned") == 1) {
|
if (getprop("/instrumentation/adirs/adr[1]/active") == 1) {
|
||||||
me["ASI_group"].show();
|
me["ASI_group"].show();
|
||||||
me["AI_group"].show();
|
|
||||||
me["ALT_group"].show();
|
me["ALT_group"].show();
|
||||||
me["ALT_group2"].show();
|
me["ALT_group2"].show();
|
||||||
me["ALT_scale"].show();
|
me["ALT_scale"].show();
|
||||||
me["VS_group"].show();
|
me["VS_group"].show();
|
||||||
me["HDG_group"].show();
|
|
||||||
me["ASI_error"].hide();
|
me["ASI_error"].hide();
|
||||||
me["ASI_frame"].setColor(1,1,1);
|
me["ASI_frame"].setColor(1,1,1);
|
||||||
me["AI_error"].hide();
|
|
||||||
me["ALT_error"].hide();
|
me["ALT_error"].hide();
|
||||||
me["ALT_frame"].setColor(1,1,1);
|
me["ALT_frame"].setColor(1,1,1);
|
||||||
me["VS_error"].hide();
|
me["VS_error"].hide();
|
||||||
me["HDG_error"].hide();
|
|
||||||
me["HDG_frame"].setColor(1,1,1);
|
|
||||||
} else {
|
} else {
|
||||||
me["ASI_error"].show();
|
me["ASI_error"].show();
|
||||||
me["ASI_frame"].setColor(1,0,0);
|
me["ASI_frame"].setColor(1,0,0);
|
||||||
me["AI_error"].show();
|
|
||||||
me["ALT_error"].show();
|
me["ALT_error"].show();
|
||||||
me["ALT_frame"].setColor(1,0,0);
|
me["ALT_frame"].setColor(1,0,0);
|
||||||
me["VS_error"].show();
|
me["VS_error"].show();
|
||||||
me["HDG_error"].show();
|
|
||||||
me["HDG_frame"].setColor(1,0,0);
|
|
||||||
me["ASI_group"].hide();
|
me["ASI_group"].hide();
|
||||||
me["AI_group"].hide();
|
|
||||||
me["ALT_group"].hide();
|
me["ALT_group"].hide();
|
||||||
me["ALT_group2"].hide();
|
me["ALT_group2"].hide();
|
||||||
me["ALT_scale"].hide();
|
me["ALT_scale"].hide();
|
||||||
me["VS_group"].hide();
|
me["VS_group"].hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getprop("/instrumentation/adirs/ir[1]/aligned") == 1) {
|
||||||
|
me["AI_group"].show();
|
||||||
|
me["HDG_group"].show();
|
||||||
|
me["AI_error"].hide();
|
||||||
|
me["HDG_error"].hide();
|
||||||
|
me["HDG_frame"].setColor(1,1,1);
|
||||||
|
} else {
|
||||||
|
me["AI_error"].show();
|
||||||
|
me["HDG_error"].show();
|
||||||
|
me["HDG_frame"].setColor(1,0,0);
|
||||||
|
me["AI_group"].hide();
|
||||||
me["HDG_group"].hide();
|
me["HDG_group"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ var canvas_upperECAM_base = {
|
||||||
setprop("/instrumentation/du/du3-test", 0);
|
setprop("/instrumentation/du/du3-test", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110 and getprop("/controls/lighting/DU/du3") > 0) {
|
if ((getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110) and getprop("/controls/lighting/DU/du3") > 0) {
|
||||||
if (getprop("/instrumentation/du/du3-test-time") + 39 >= elapsedtime) {
|
if (getprop("/instrumentation/du/du3-test-time") + 39 >= elapsedtime) {
|
||||||
upperECAM_cfm_eis2.page.hide();
|
upperECAM_cfm_eis2.page.hide();
|
||||||
upperECAM_iae_eis2.page.hide();
|
upperECAM_iae_eis2.page.hide();
|
||||||
|
|
391
Nasal/ADIRS.nas
391
Nasal/ADIRS.nas
|
@ -1,59 +1,45 @@
|
||||||
# A3XX ADIRS system
|
# A3XX ADIRS System
|
||||||
# Jonathan Redpath and Joshua Davidson
|
# Joshua Davidson
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
# Copyright (c) Joshua Davidson (it0uchpods) #
|
# Copyright (c) Joshua Davidson (it0uchpods) #
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
#####################
|
|
||||||
# Initializing Vars #
|
|
||||||
#####################
|
|
||||||
|
|
||||||
setprop("/systems/electrical/bus/dc1", 0);
|
|
||||||
setprop("/systems/electrical/bus/dc2", 0);
|
|
||||||
setprop("/systems/electrical/bus/dc-ess", 0);
|
|
||||||
setprop("/systems/electrical/bus/ac1", 0);
|
|
||||||
setprop("/systems/electrical/bus/ac2", 0);
|
|
||||||
setprop("/systems/electrical/bus/ac-ess", 0);
|
|
||||||
var ttn = 0;
|
|
||||||
var knob = 0;
|
var knob = 0;
|
||||||
|
setprop("/controls/adirs/align-time", 600);
|
||||||
|
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var roll = getprop("/orientation/roll-deg");
|
var roll = getprop("/orientation/roll-deg");
|
||||||
var pitch = getprop("/orientation/pitch-deg");
|
var pitch = getprop("/orientation/pitch-deg");
|
||||||
var gs = getprop("/velocities/groundspeed-kt");
|
var gs = getprop("/velocities/groundspeed-kt");
|
||||||
var data_knob = getprop("/controls/adirs/display/dataknob");
|
var ac1 = 0;
|
||||||
var selected_ir = getprop("/controls/adirs/display/selected");
|
var ac2 = 0;
|
||||||
|
var batt1_amps = 0;
|
||||||
|
var batt2_amps = 0;
|
||||||
|
var pwr_src = "XX";
|
||||||
});
|
});
|
||||||
|
|
||||||
var adirs_init = func {
|
var ADIRS = {
|
||||||
setprop("/controls/adirs/mcducbtn",0);
|
init: func() {
|
||||||
adirs_timer.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
var ADIRSreset = func {
|
|
||||||
setprop("/controls/adirs/numm", 0);
|
setprop("/controls/adirs/numm", 0);
|
||||||
|
setprop("/instrumentation/adirs/adr[0]/active", 0);
|
||||||
|
setprop("/instrumentation/adirs/adr[1]/active", 0);
|
||||||
|
setprop("/instrumentation/adirs/adr[2]/active", 0);
|
||||||
setprop("/instrumentation/adirs/ir[0]/aligned", 0);
|
setprop("/instrumentation/adirs/ir[0]/aligned", 0);
|
||||||
setprop("/instrumentation/adirs/ir[1]/aligned", 0);
|
setprop("/instrumentation/adirs/ir[1]/aligned", 0);
|
||||||
setprop("/instrumentation/adirs/ir[2]/aligned", 0);
|
setprop("/instrumentation/adirs/ir[2]/aligned", 0);
|
||||||
setprop("/instrumentation/adirs/ir[0]/display/ttn",0);
|
|
||||||
setprop("/instrumentation/adirs/ir[1]/display/ttn",0);
|
|
||||||
setprop("/instrumentation/adirs/ir[2]/display/ttn",0);
|
|
||||||
setprop("/instrumentation/adirs/ir[0]/display/status","- - - - - - - - ");
|
|
||||||
setprop("/instrumentation/adirs/ir[1]/display/status","- - - - - - - - ");
|
|
||||||
setprop("/instrumentation/adirs/ir[2]/display/status","- - - - - - - - ");
|
|
||||||
setprop("/controls/adirs/adr[0]/fault", 0);
|
setprop("/controls/adirs/adr[0]/fault", 0);
|
||||||
setprop("/controls/adirs/adr[1]/fault", 0);
|
setprop("/controls/adirs/adr[1]/fault", 0);
|
||||||
setprop("/controls/adirs/adr[2]/fault", 0);
|
setprop("/controls/adirs/adr[2]/fault", 0);
|
||||||
setprop("/controls/adirs/adr[0]/off", 0);
|
setprop("/controls/adirs/adr[0]/off", 0);
|
||||||
setprop("/controls/adirs/adr[1]/off", 0);
|
setprop("/controls/adirs/adr[1]/off", 0);
|
||||||
setprop("/controls/adirs/adr[2]/off", 0);
|
setprop("/controls/adirs/adr[2]/off", 0);
|
||||||
setprop("/controls/adirs/display/text","");
|
|
||||||
setprop("/controls/adirs/display/dataknob","5");
|
|
||||||
setprop("/controls/adirs/display/selected","1");
|
|
||||||
setprop("/controls/adirs/ir[0]/align", 0);
|
setprop("/controls/adirs/ir[0]/align", 0);
|
||||||
setprop("/controls/adirs/ir[1]/align", 0);
|
setprop("/controls/adirs/ir[1]/align", 0);
|
||||||
setprop("/controls/adirs/ir[2]/align", 0);
|
setprop("/controls/adirs/ir[2]/align", 0);
|
||||||
|
setprop("/controls/adirs/ir[0]/time", 0);
|
||||||
|
setprop("/controls/adirs/ir[1]/time", 0);
|
||||||
|
setprop("/controls/adirs/ir[2]/time", 0);
|
||||||
setprop("/controls/adirs/ir[0]/knob", 0);
|
setprop("/controls/adirs/ir[0]/knob", 0);
|
||||||
setprop("/controls/adirs/ir[1]/knob", 0);
|
setprop("/controls/adirs/ir[1]/knob", 0);
|
||||||
setprop("/controls/adirs/ir[2]/knob", 0);
|
setprop("/controls/adirs/ir[2]/knob", 0);
|
||||||
|
@ -72,225 +58,180 @@ var ADIRSreset = func {
|
||||||
setprop("/controls/adirs/mcdu/avgdrift1", "");
|
setprop("/controls/adirs/mcdu/avgdrift1", "");
|
||||||
setprop("/controls/adirs/mcdu/avgdrift2", "");
|
setprop("/controls/adirs/mcdu/avgdrift2", "");
|
||||||
setprop("/controls/adirs/mcdu/avgdrift3", "");
|
setprop("/controls/adirs/mcdu/avgdrift3", "");
|
||||||
adirs_init();
|
setprop("/controls/adirs/mcducbtn",0);
|
||||||
}
|
},
|
||||||
|
loop: func() {
|
||||||
var ir_align_loop = func(i) {
|
|
||||||
ttn = getprop("/instrumentation/adirs/ir[" ~ i ~ "]/display/ttn");
|
|
||||||
if ((ttn >= 0) and (ttn < 0.99)) { # Make it less sensitive
|
|
||||||
ir_align_finish(i);
|
|
||||||
} else {
|
|
||||||
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/display/ttn", ttn - 1);
|
|
||||||
}
|
|
||||||
roll = getprop("/orientation/roll-deg");
|
roll = getprop("/orientation/roll-deg");
|
||||||
pitch = getprop("/orientation/pitch-deg");
|
pitch = getprop("/orientation/pitch-deg");
|
||||||
gs = getprop("/velocities/groundspeed-kt");
|
gs = getprop("/velocities/groundspeed-kt");
|
||||||
if (gs > 2) {
|
ac1 = getprop("/systems/electrical/bus/ac1");
|
||||||
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/display/status", "STS-XCESS MOTION");
|
ac2 = getprop("/systems/electrical/bus/ac2");
|
||||||
ir_align_abort(i);
|
batt1_amps = getprop("/systems/electrical/battery1-amps");
|
||||||
}
|
batt2_amps = getprop("/systems/electrical/battery2-amps");
|
||||||
|
|
||||||
|
if (getprop("/controls/adirs/skip") == 1) {
|
||||||
|
if (getprop("/controls/adirs/align-time") != 5) {
|
||||||
|
setprop("/controls/adirs/align-time", 5);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
var ir0_align_loop_timer = maketimer(1, func{ir_align_loop(0)});
|
if (getprop("/controls/adirs/align-time") != 600) {
|
||||||
var ir1_align_loop_timer = maketimer(1, func{ir_align_loop(1)});
|
setprop("/controls/adirs/align-time", 600);
|
||||||
var ir2_align_loop_timer = maketimer(1, func{ir_align_loop(2)});
|
|
||||||
|
|
||||||
var ir_align_start = func(i) {
|
|
||||||
if (((i == 0) and !ir0_align_loop_timer.isRunning) or
|
|
||||||
((i == 1) and !ir1_align_loop_timer.isRunning) or
|
|
||||||
((i == 2) and !ir2_align_loop_timer.isRunning)) {
|
|
||||||
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/display/ttn", (math.sin((getprop("/position/latitude-deg") / 90) * (math.pi / 2)) * 720) + 300);
|
|
||||||
if (i == 0) {
|
|
||||||
ir0_align_loop_timer.start();
|
|
||||||
} else if (i == 1) {
|
|
||||||
ir1_align_loop_timer.start();
|
|
||||||
} else if (i == 2) {
|
|
||||||
ir2_align_loop_timer.start();
|
|
||||||
}
|
|
||||||
setprop("/controls/adirs/ir[" ~ i ~ "]/align", 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var ir_align_finish = func(i) {
|
if (gs > 5 or pitch > 5 or pitch < -5 or roll > 10 or roll < -10 or (ac1 < 110 and ac2 < 110 and batt1_amps < 120 and batt2_amps < 120)) {
|
||||||
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/aligned", 1);
|
if (getprop("/controls/adirs/ir[0]/align") == 1) {
|
||||||
if (i == 0) {
|
me.stopAlign(0,1);
|
||||||
ir0_align_loop_timer.stop();
|
|
||||||
} else if (i == 1) {
|
|
||||||
ir1_align_loop_timer.stop();
|
|
||||||
} else if (i == 2) {
|
|
||||||
ir2_align_loop_timer.stop();
|
|
||||||
}
|
}
|
||||||
setprop("/controls/adirs/ir[" ~ i ~ "]/align", 0);
|
if (getprop("/controls/adirs/ir[1]/align") == 1) {
|
||||||
|
me.stopAlign(1,1);
|
||||||
}
|
}
|
||||||
|
if (getprop("/controls/adirs/ir[2]/align") == 1) {
|
||||||
var ir_align_abort = func(i) {
|
me.stopAlign(2,1);
|
||||||
setprop("/controls/adirs/ir[" ~ i ~ "]/fault", 1);
|
|
||||||
if (i == 0) {
|
|
||||||
ir0_align_loop_timer.stop();
|
|
||||||
} else if (i == 1) {
|
|
||||||
ir1_align_loop_timer.stop();
|
|
||||||
} else if (i == 2) {
|
|
||||||
ir2_align_loop_timer.stop();
|
|
||||||
}
|
|
||||||
setprop("/controls/adirs/ir[" ~ i ~ "]/align", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
var ir_knob_move = func(i) {
|
|
||||||
knob = getprop("/controls/adirs/ir[" ~ i ~ "]/knob");
|
|
||||||
if (knob == 1) {
|
|
||||||
setprop("/controls/adirs/ir[" ~ i ~ "]/align", 0);
|
|
||||||
setprop("/controls/adirs/ir[" ~ i ~ "]/fault", 0);
|
|
||||||
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/aligned", 0);
|
|
||||||
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/display/status", "- - - - - - - - ");
|
|
||||||
if (i == 0) {
|
|
||||||
ir0_align_loop_timer.stop();
|
|
||||||
} else if (i == 1) {
|
|
||||||
ir1_align_loop_timer.stop();
|
|
||||||
} else if (i == 2) {
|
|
||||||
ir2_align_loop_timer.stop();
|
|
||||||
}
|
|
||||||
} else if (knob == 2) {
|
|
||||||
if ( !getprop("/instrumentation/adirs/ir[" ~ i ~ "]/aligned") and
|
|
||||||
(getprop("/systems/electrical/bus/ac-ess") > 9) ) {
|
|
||||||
ir_align_start(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setlistener("/controls/adirs/ir[0]/knob", func {
|
|
||||||
ir_knob_move(0);
|
|
||||||
knobmcducheck();
|
|
||||||
});
|
|
||||||
setlistener("/controls/adirs/ir[1]/knob", func {
|
|
||||||
ir_knob_move(1);
|
|
||||||
knobmcducheck();
|
|
||||||
});
|
|
||||||
setlistener("/controls/adirs/ir[2]/knob", func {
|
|
||||||
ir_knob_move(2);
|
|
||||||
knobmcducheck();
|
|
||||||
});
|
|
||||||
|
|
||||||
var knobmcducheck = func {
|
|
||||||
if (getprop("/controls/adirs/ir[0]/knob") == 1 and getprop("/controls/adirs/ir[1]/knob") == 1 and getprop("/controls/adirs/ir[2]/knob") == 1) {
|
|
||||||
setprop("/controls/adirs/mcducbtn", 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var onbat_light = func {
|
if (ac1 >= 110 or ac2 >= 110) {
|
||||||
if (((getprop("/systems/electrical/bus/dc1") > 25) or (getprop("/systems/electrical/bus/dc2") > 25)) and
|
pwr_src = "AC";
|
||||||
((getprop("/systems/electrical/bus/ac1") < 110) and getprop("/systems/electrical/bus/ac2") < 110) and
|
} else if (batt1_amps >= 120 or batt2_amps >= 120) {
|
||||||
((getprop("/controls/adirs/ir[0]/knob") > 1) or
|
pwr_src = "BATT";
|
||||||
(getprop("/controls/adirs/ir[1]/knob") > 1) or
|
} else {
|
||||||
(getprop("/controls/adirs/ir[2]/knob") > 1))) {
|
pwr_src = "XX";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getprop("/controls/adirs/ir[0]/time") + 3 >= getprop("/sim/time/elapsed-sec") or getprop("/controls/adirs/ir[1]/time") + 3 >= getprop("/sim/time/elapsed-sec") or getprop("/controls/adirs/ir[2]/time") + 3 >= getprop("/sim/time/elapsed-sec")) {
|
||||||
|
setprop("/controls/adirs/onbat", 1);
|
||||||
|
} else if (pwr_src == "BATT") {
|
||||||
setprop("/controls/adirs/onbat", 1);
|
setprop("/controls/adirs/onbat", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/adirs/onbat", 0);
|
setprop("/controls/adirs/onbat", 0);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
knob: func(k) {
|
||||||
|
knob = getprop("/controls/adirs/ir[" ~ k ~ "]/knob");
|
||||||
|
if (knob == 0) {
|
||||||
|
me.stopAlign(k,0);
|
||||||
|
} else if (knob == 1) {
|
||||||
|
me.beginAlign(k);
|
||||||
|
} else if (knob == 2) {
|
||||||
|
me.beginAlign(k);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
beginAlign: func(n) {
|
||||||
|
ac1 = getprop("/systems/electrical/bus/ac1");
|
||||||
|
ac2 = getprop("/systems/electrical/bus/ac2");
|
||||||
|
batt1_amps = getprop("/systems/electrical/battery1-amps");
|
||||||
|
batt2_amps = getprop("/systems/electrical/battery2-amps");
|
||||||
|
setprop("/instrumentation/adirs/adr[" ~ n ~ "]/active", 1);
|
||||||
|
if (getprop("/controls/adirs/ir[" ~ n ~ "]/align") != 1 and getprop("/instrumentation/adirs/ir[" ~ n ~ "]/aligned") != 1 and (ac1 >= 110 or ac2 >= 110 or batt1_amps >= 120 or batt2_amps >= 120)) {
|
||||||
|
setprop("/controls/adirs/ir[" ~ n ~ "]/time", getprop("/sim/time/elapsed-sec"));
|
||||||
|
setprop("/controls/adirs/ir[" ~ n ~ "]/align", 1);
|
||||||
|
setprop("/controls/adirs/ir[" ~ n ~ "]/fault", 0);
|
||||||
|
if (n == 0) {
|
||||||
|
alignOne.start();
|
||||||
|
} else if (n == 1) {
|
||||||
|
alignTwo.start();
|
||||||
|
} else if (n == 2) {
|
||||||
|
alignThree.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
stopAlign: func(n,f) {
|
||||||
|
setprop("/controls/adirs/ir[" ~ n ~ "]/align", 0);
|
||||||
|
if (f == 1) {
|
||||||
|
setprop("/controls/adirs/ir[" ~ n ~ "]/fault", 1);
|
||||||
|
} else {
|
||||||
|
setprop("/controls/adirs/ir[" ~ n ~ "]/fault", 0);
|
||||||
|
}
|
||||||
|
if (n == 0) {
|
||||||
|
alignOne.stop();
|
||||||
|
} else if (n == 1) {
|
||||||
|
alignTwo.stop();
|
||||||
|
} else if (n == 2) {
|
||||||
|
alignThree.stop();
|
||||||
|
}
|
||||||
|
setprop("/instrumentation/adirs/adr[" ~ n ~ "]/active", 0);
|
||||||
|
setprop("/instrumentation/adirs/ir[" ~ n ~ "]/aligned", 0);
|
||||||
|
},
|
||||||
|
skip: func(n) {
|
||||||
|
if (n == 0) {
|
||||||
|
alignOne.stop();
|
||||||
|
} else if (n == 1) {
|
||||||
|
alignTwo.stop();
|
||||||
|
} else if (n == 2) {
|
||||||
|
alignThree.stop();
|
||||||
|
}
|
||||||
|
setprop("/controls/adirs/ir[" ~ n ~ "]/align", 0);
|
||||||
|
setprop("/controls/adirs/ir[" ~ n ~ "]/fault", 0);
|
||||||
|
setprop("/instrumentation/adirs/ir[" ~ n ~ "]/aligned", 1);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
var onbat_light_b = func {
|
var alignOne = maketimer(0.1, func {
|
||||||
setprop("/controls/adirs/onbat", 1);
|
if (getprop("/controls/adirs/ir[0]/time") + getprop("/controls/adirs/align-time") >= getprop("/sim/time/elapsed-sec")) {
|
||||||
settimer(func {
|
if (getprop("/instrumentation/adirs/ir[0]/aligned") != 0) {
|
||||||
onbat_light();
|
setprop("/instrumentation/adirs/ir[0]/aligned", 0);
|
||||||
}, 4);
|
|
||||||
if (getprop("/controls/adirs/skip") == 1) {
|
|
||||||
skip_ADIRS();
|
|
||||||
}
|
}
|
||||||
}
|
if (getprop("/controls/adirs/ir[0]/align") != 1) {
|
||||||
|
setprop("/controls/adirs/ir[0]/align", 1);
|
||||||
setlistener("/controls/electrical/switches/gen-apu", onbat_light);
|
|
||||||
setlistener("/controls/electrical/switches/gen1", onbat_light);
|
|
||||||
setlistener("/controls/electrical/switches/gen2", onbat_light);
|
|
||||||
setlistener("/controls/electrical/switches/gen-ext", onbat_light);
|
|
||||||
setlistener("/systems/electrical/bus/ac-ess", onbat_light);
|
|
||||||
setlistener("/controls/adirs/ir[0]/knob", onbat_light_b);
|
|
||||||
setlistener("/controls/adirs/ir[1]/knob", onbat_light_b);
|
|
||||||
setlistener("/controls/adirs/ir[2]/knob", onbat_light_b);
|
|
||||||
|
|
||||||
|
|
||||||
var adirs_display = func() {
|
|
||||||
data_knob = getprop("/controls/adirs/display/dataknob");
|
|
||||||
selected_ir = getprop("/controls/adirs/display/selected");
|
|
||||||
if ( selected_ir == 1 ) {
|
|
||||||
setprop("/controls/adirs/display/text", "");
|
|
||||||
} else {
|
|
||||||
if ( data_knob == 1 ) {
|
|
||||||
setprop("/controls/adirs/display/text", "888888888888888");
|
|
||||||
} else if ( data_knob == 2 ) {
|
|
||||||
if ( ((selected_ir == 2) and getprop("/instrumentation/adirs/ir[0]/aligned")) or
|
|
||||||
((selected_ir == 3) and getprop("/instrumentation/adirs/ir[2]/aligned")) or
|
|
||||||
((selected_ir == 4) and getprop("/instrumentation/adirs/ir[1]/aligned")) ) {
|
|
||||||
setprop("/controls/adirs/display/text", sprintf(" %03i", getprop("/orientation/track-magnetic-deg")) ~ sprintf(" %03i", getprop("/velocities/groundspeed-kt")));
|
|
||||||
} else {
|
|
||||||
setprop("/controls/adirs/display/text", "- - - - - - - - ");
|
|
||||||
}
|
|
||||||
} else if ( data_knob == 3 ) {
|
|
||||||
lat = abs(getprop("/position/latitude-deg"));
|
|
||||||
lon = abs(getprop("/position/longitude-deg"));
|
|
||||||
setprop("/controls/adirs/display/text", substr(getprop("/position/latitude-string"), -1, 1) ~
|
|
||||||
sprintf("%2i", lat) ~ "'" ~
|
|
||||||
sprintf("%2.1f", (lat - math.floor(lat)) * 60) ~
|
|
||||||
substr(getprop("/position/longitude-string"), -1, 1) ~
|
|
||||||
sprintf("%3i", lon) ~ "'" ~
|
|
||||||
sprintf("%2.1f", (lon - math.floor(lon)) * 60));
|
|
||||||
} else if ( data_knob == 4 ) {
|
|
||||||
if ( ((selected_ir == 2) and getprop("/instrumentation/adirs/ir[0]/aligned")) or
|
|
||||||
((selected_ir == 3) and getprop("/instrumentation/adirs/ir[2]/aligned")) or
|
|
||||||
((selected_ir == 4) and getprop("/instrumentation/adirs/ir[1]/aligned")) ) {
|
|
||||||
setprop("/controls/adirs/display/text", sprintf(" %03i", getprop("/environment/wind-from-heading-deg")) ~ sprintf(" %03i", getprop("/environment/wind-speed-kt")));
|
|
||||||
} else {
|
|
||||||
setprop("/controls/adirs/display/text", "- - - - - - - - ");
|
|
||||||
}
|
|
||||||
} else if ( data_knob == 5 ) {
|
|
||||||
if ( ((selected_ir == 2) and getprop("/instrumentation/adirs/ir[0]/aligned")) or
|
|
||||||
((selected_ir == 3) and getprop("/instrumentation/adirs/ir[2]/aligned")) or
|
|
||||||
((selected_ir == 4) and getprop("/instrumentation/adirs/ir[1]/aligned")) ) {
|
|
||||||
lat = getprop("/position/latitude-deg");
|
|
||||||
lon = getprop("/position/longitude-deg");
|
|
||||||
if ((lat > 82) or (lat < -60) or (lon < -90 and lon > -120 and lat > 73)) {
|
|
||||||
setprop("/controls/adirs/display/text", sprintf(" %3.1f", getprop("/orientation/heading-deg")) ~ "- - - - "); # this is true heading
|
|
||||||
} else {
|
|
||||||
setprop("/controls/adirs/display/text", sprintf(" %3.1f", getprop("/orientation/heading-magnetic-deg")) ~ "- - - - ");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( (selected_ir == 2) and getprop("/controls/adirs/ir[0]/align") ) {
|
if (getprop("/instrumentation/adirs/ir[0]/aligned") != 1 and getprop("/controls/adirs/mcducbtn") == 1) {
|
||||||
setprop("controls/adirs/display/text", "- - - - " ~ sprintf(" TTN %2i", (getprop("/instrumentation/adirs/ir[0]/display/ttn") / 60)));
|
alignOne.stop();
|
||||||
} else if ( (selected_ir == 3) and getprop("/controls/adirs/ir[2]/align") ) {
|
setprop("/instrumentation/adirs/ir[0]/aligned", 1);
|
||||||
setprop("controls/adirs/display/text", "- - - - " ~ sprintf(" TTN %2i", (getprop("/instrumentation/adirs/ir[2]/display/ttn") / 60)));
|
|
||||||
} else if ( (selected_ir == 4) and getprop("/controls/adirs/ir[1]/align") ) {
|
|
||||||
setprop("controls/adirs/display/text", "- - - - " ~ sprintf(" TTN %2i", (getprop("/instrumentation/adirs/ir[1]/display/ttn") / 60)));
|
|
||||||
} else {
|
|
||||||
setprop("/controls/adirs/display/text", "- - - - - - - - ");
|
|
||||||
}
|
}
|
||||||
|
if (getprop("/controls/adirs/ir[0]/align") != 0) {
|
||||||
|
setprop("/controls/adirs/ir[0]/align", 0);
|
||||||
}
|
}
|
||||||
} else if ( data_knob == 6 ) {
|
|
||||||
if ( selected_ir == 2 ) {
|
|
||||||
setprop("/controls/adirs/display/text","- - - - - - - - ");
|
|
||||||
} else if ( selected_ir == 3 ) {
|
|
||||||
setprop("/controls/adirs/display/text","- - - - - - - - ");
|
|
||||||
} else if ( selected_ir == 4 ) {
|
|
||||||
setprop("/controls/adirs/display/text","- - - - - - - - ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var skip_ADIRS = func {
|
|
||||||
if (getprop("/controls/adirs/ir[0]/knob") == 2) {
|
|
||||||
setprop("/instrumentation/adirs/ir[0]/display/ttn",1); # Set it to 1 so it counts down from 1 to 0
|
|
||||||
}
|
|
||||||
if (getprop("/controls/adirs/ir[1]/knob") == 2) {
|
|
||||||
setprop("/instrumentation/adirs/ir[1]/display/ttn",1); # Set it to 1 so it counts down from 1 to 0
|
|
||||||
}
|
|
||||||
if (getprop("/controls/adirs/ir[2]/knob") == 2) {
|
|
||||||
setprop("/instrumentation/adirs/ir[2]/display/ttn",1); # Set it to 1 so it counts down from 1 to 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var adirs_skip = setlistener("/controls/adirs/skip", func {
|
|
||||||
if (getprop("/controls/adirs/skip") == 1) {
|
|
||||||
skip_ADIRS();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var adirs_timer = maketimer(1, adirs_display);
|
var alignTwo = maketimer(0.1, func {
|
||||||
|
if (getprop("/controls/adirs/ir[1]/time") + getprop("/controls/adirs/align-time") >= getprop("/sim/time/elapsed-sec")) {
|
||||||
|
if (getprop("/instrumentation/adirs/ir[1]/aligned") != 0) {
|
||||||
|
setprop("/instrumentation/adirs/ir[1]/aligned", 0);
|
||||||
|
}
|
||||||
|
if (getprop("/controls/adirs/ir[1]/align") != 1) {
|
||||||
|
setprop("/controls/adirs/ir[1]/align", 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (getprop("/instrumentation/adirs/ir[1]/aligned") != 1 and getprop("/controls/adirs/mcducbtn") == 1) {
|
||||||
|
alignTwo.stop();
|
||||||
|
setprop("/instrumentation/adirs/ir[1]/aligned", 1);
|
||||||
|
}
|
||||||
|
if (getprop("/controls/adirs/ir[1]/align") != 0) {
|
||||||
|
setprop("/controls/adirs/ir[1]/align", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var alignThree = maketimer(0.1, func {
|
||||||
|
if (getprop("/controls/adirs/ir[2]/time") + getprop("/controls/adirs/align-time") >= getprop("/sim/time/elapsed-sec")) {
|
||||||
|
if (getprop("/instrumentation/adirs/ir[2]/aligned") != 0) {
|
||||||
|
setprop("/instrumentation/adirs/ir[2]/aligned", 0);
|
||||||
|
}
|
||||||
|
if (getprop("/controls/adirs/ir[2]/align") != 1) {
|
||||||
|
setprop("/controls/adirs/ir[2]/align", 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (getprop("/instrumentation/adirs/ir[2]/aligned") != 1 and getprop("/controls/adirs/mcducbtn") == 1) {
|
||||||
|
alignThree.stop();
|
||||||
|
setprop("/instrumentation/adirs/ir[2]/aligned", 1);
|
||||||
|
}
|
||||||
|
if (getprop("/controls/adirs/ir[2]/align") != 0) {
|
||||||
|
setprop("/controls/adirs/ir[2]/align", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
setlistener("/controls/adirs/ir[0]/knob", func {
|
||||||
|
ADIRS.knob(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
setlistener("/controls/adirs/ir[1]/knob", func {
|
||||||
|
ADIRS.knob(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
setlistener("/controls/adirs/ir[2]/knob", func {
|
||||||
|
ADIRS.knob(2);
|
||||||
|
});
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
# Copyright (c) Joshua Davidson (it0uchpods) #
|
# Copyright (c) Joshua Davidson (it0uchpods) #
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
#############
|
|
||||||
# Init Vars #
|
|
||||||
#############
|
|
||||||
|
|
||||||
var ac_volt_std = 115;
|
var ac_volt_std = 115;
|
||||||
var ac_volt_min = 110;
|
var ac_volt_min = 110;
|
||||||
var dc_volt_std = 28;
|
var dc_volt_std = 28;
|
||||||
|
@ -64,7 +60,8 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var replay = getprop("/sim/replay/replay-state");
|
var replay = getprop("/sim/replay/replay-state");
|
||||||
});
|
});
|
||||||
|
|
||||||
var elec_init = func {
|
var ELEC = {
|
||||||
|
init: func() {
|
||||||
setprop("/controls/switches/annun-test", 0);
|
setprop("/controls/switches/annun-test", 0);
|
||||||
setprop("/controls/electrical/switches/galley", 1);
|
setprop("/controls/electrical/switches/galley", 1);
|
||||||
setprop("/controls/electrical/switches/idg1", 0);
|
setprop("/controls/electrical/switches/idg1", 0);
|
||||||
|
@ -148,14 +145,8 @@ var elec_init = func {
|
||||||
setprop("/systems/electrical/outputs/taxi-lights", 0);
|
setprop("/systems/electrical/outputs/taxi-lights", 0);
|
||||||
setprop("/systems/electrical/outputs/transponder", 0);
|
setprop("/systems/electrical/outputs/transponder", 0);
|
||||||
setprop("/systems/electrical/outputs/turn-coordinator", 0);
|
setprop("/systems/electrical/outputs/turn-coordinator", 0);
|
||||||
elec_timer.start();
|
},
|
||||||
}
|
loop: func() {
|
||||||
|
|
||||||
######################
|
|
||||||
# Main Electric Loop #
|
|
||||||
######################
|
|
||||||
|
|
||||||
var master_elec = func {
|
|
||||||
galley_sw = getprop("/controls/electrical/switches/galley");
|
galley_sw = getprop("/controls/electrical/switches/galley");
|
||||||
idg1_sw = getprop("/controls/electrical/switches/idg1");
|
idg1_sw = getprop("/controls/electrical/switches/idg1");
|
||||||
idg2_sw = getprop("/controls/electrical/switches/idg2");
|
idg2_sw = getprop("/controls/electrical/switches/idg2");
|
||||||
|
@ -464,8 +455,6 @@ var master_elec = func {
|
||||||
setprop("/it-autoflight/input/ap2", 0);
|
setprop("/it-autoflight/input/ap2", 0);
|
||||||
}
|
}
|
||||||
setprop("systems/electrical/on", 0);
|
setprop("systems/electrical/on", 0);
|
||||||
# ai_spin.setValue(0.2);
|
|
||||||
# aispin.stop();
|
|
||||||
setprop("/systems/electrical/outputs/adf", 0);
|
setprop("/systems/electrical/outputs/adf", 0);
|
||||||
setprop("/systems/electrical/outputs/audio-panel", 0);
|
setprop("/systems/electrical/outputs/audio-panel", 0);
|
||||||
setprop("/systems/electrical/outputs/audio-panel[1]", 0);
|
setprop("/systems/electrical/outputs/audio-panel[1]", 0);
|
||||||
|
@ -502,7 +491,6 @@ var master_elec = func {
|
||||||
setprop("/controls/lighting/overhead-panel-norm", 0);
|
setprop("/controls/lighting/overhead-panel-norm", 0);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/electrical/on", 1);
|
setprop("/systems/electrical/on", 1);
|
||||||
# aispin.start();
|
|
||||||
setprop("/systems/electrical/outputs/adf", dc_volt_std);
|
setprop("/systems/electrical/outputs/adf", dc_volt_std);
|
||||||
setprop("/systems/electrical/outputs/audio-panel", dc_volt_std);
|
setprop("/systems/electrical/outputs/audio-panel", dc_volt_std);
|
||||||
setprop("/systems/electrical/outputs/audio-panel[1]", dc_volt_std);
|
setprop("/systems/electrical/outputs/audio-panel[1]", dc_volt_std);
|
||||||
|
@ -584,21 +572,8 @@ var master_elec = func {
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/electrical/gen2-fault", 0);
|
setprop("/systems/electrical/gen2-fault", 0);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
};
|
||||||
###################
|
|
||||||
# Update Function #
|
|
||||||
###################
|
|
||||||
|
|
||||||
var update_electrical = func {
|
|
||||||
master_elec();
|
|
||||||
}
|
|
||||||
|
|
||||||
##########
|
|
||||||
# Timers #
|
|
||||||
##########
|
|
||||||
|
|
||||||
var elec_timer = maketimer(0.2, update_electrical);
|
|
||||||
|
|
||||||
var charge1 = maketimer(6, func {
|
var charge1 = maketimer(6, func {
|
||||||
bat1_volts = getprop("/systems/electrical/battery1-volts");
|
bat1_volts = getprop("/systems/electrical/battery1-volts");
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
# Copyright (c) Joshua Davidson (it0uchpods) #
|
# Copyright (c) Joshua Davidson (it0uchpods) #
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
#############
|
|
||||||
# Init Vars #
|
|
||||||
#############
|
|
||||||
|
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var xfeed_sw = getprop("/controls/fuel/x-feed");
|
var xfeed_sw = getprop("/controls/fuel/x-feed");
|
||||||
var tank0pump1_sw = getprop("/controls/fuel/tank0pump1");
|
var tank0pump1_sw = getprop("/controls/fuel/tank0pump1");
|
||||||
|
@ -39,7 +35,8 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var tank2pump2_fail = getprop("/systems/failures/tank2pump2");
|
var tank2pump2_fail = getprop("/systems/failures/tank2pump2");
|
||||||
});
|
});
|
||||||
|
|
||||||
var fuel_init = func {
|
var FUEL = {
|
||||||
|
init: func() {
|
||||||
setprop("/systems/fuel/gravityfeedL", 0);
|
setprop("/systems/fuel/gravityfeedL", 0);
|
||||||
setprop("/systems/fuel/gravityfeedR", 0);
|
setprop("/systems/fuel/gravityfeedR", 0);
|
||||||
setprop("/systems/fuel/gravityfeedL-output", 0);
|
setprop("/systems/fuel/gravityfeedL-output", 0);
|
||||||
|
@ -64,13 +61,8 @@ var fuel_init = func {
|
||||||
setprop("/systems/fuel/tank2pump1-fault", 0);
|
setprop("/systems/fuel/tank2pump1-fault", 0);
|
||||||
setprop("/systems/fuel/tank2pump2-fault", 0);
|
setprop("/systems/fuel/tank2pump2-fault", 0);
|
||||||
setprop("/systems/fuel/mode-fault", 0);
|
setprop("/systems/fuel/mode-fault", 0);
|
||||||
fuel_timer.start();
|
},
|
||||||
}
|
loop: func() {
|
||||||
|
|
||||||
##############
|
|
||||||
# Main Loops #
|
|
||||||
##############
|
|
||||||
var master_fuel = func {
|
|
||||||
xfeed_sw = getprop("/controls/fuel/x-feed");
|
xfeed_sw = getprop("/controls/fuel/x-feed");
|
||||||
tank0pump1_sw = getprop("/controls/fuel/tank0pump1");
|
tank0pump1_sw = getprop("/controls/fuel/tank0pump1");
|
||||||
tank0pump2_sw = getprop("/controls/fuel/tank0pump2");
|
tank0pump2_sw = getprop("/controls/fuel/tank0pump2");
|
||||||
|
@ -202,14 +194,5 @@ var master_fuel = func {
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/tank2pump2-fault", 0);
|
setprop("/systems/fuel/tank2pump2-fault", 0);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
};
|
||||||
###################
|
|
||||||
# Update Function #
|
|
||||||
###################
|
|
||||||
|
|
||||||
var update_fuel = func {
|
|
||||||
master_fuel();
|
|
||||||
}
|
|
||||||
|
|
||||||
var fuel_timer = maketimer(0.2, update_fuel);
|
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
# Copyright (c) Joshua Davidson (it0uchpods) #
|
# Copyright (c) Joshua Davidson (it0uchpods) #
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
#############
|
|
||||||
# Init Vars #
|
|
||||||
#############
|
|
||||||
|
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var eng1_pump_sw = getprop("/controls/hydraulic/eng1-pump");
|
var eng1_pump_sw = getprop("/controls/hydraulic/eng1-pump");
|
||||||
var eng2_pump_sw = getprop("/controls/hydraulic/eng2-pump");
|
var eng2_pump_sw = getprop("/controls/hydraulic/eng2-pump");
|
||||||
|
@ -51,7 +47,8 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var down = getprop("/controls/gear/gear-down");
|
var down = getprop("/controls/gear/gear-down");
|
||||||
});
|
});
|
||||||
|
|
||||||
var hyd_init = func {
|
var HYD = {
|
||||||
|
init: func() {
|
||||||
setprop("/controls/hydraulic/eng1-pump", 1);
|
setprop("/controls/hydraulic/eng1-pump", 1);
|
||||||
setprop("/controls/hydraulic/eng2-pump", 1);
|
setprop("/controls/hydraulic/eng2-pump", 1);
|
||||||
setprop("/controls/hydraulic/elec-pump-blue", 1);
|
setprop("/controls/hydraulic/elec-pump-blue", 1);
|
||||||
|
@ -73,7 +70,7 @@ var hyd_init = func {
|
||||||
setprop("/systems/hydraulic/brakes/mode", 0);
|
setprop("/systems/hydraulic/brakes/mode", 0);
|
||||||
setprop("/systems/hydraulic/brakes/lbrake", 0);
|
setprop("/systems/hydraulic/brakes/lbrake", 0);
|
||||||
setprop("/systems/hydraulic/brakes/rbrake", 0);
|
setprop("/systems/hydraulic/brakes/rbrake", 0);
|
||||||
setprop("/systems/hydraulic/brakes/nose-rubber", 0); # This stops the nose from spinning when you raise the gear
|
setprop("/systems/hydraulic/brakes/nose-rubber", 0);
|
||||||
setprop("/systems/hydraulic/brakes/counter", 0);
|
setprop("/systems/hydraulic/brakes/counter", 0);
|
||||||
setprop("/systems/hydraulic/brakes/accumulator-pressure-psi-1", 0);
|
setprop("/systems/hydraulic/brakes/accumulator-pressure-psi-1", 0);
|
||||||
setprop("/systems/hydraulic/eng1-pump-fault", 0);
|
setprop("/systems/hydraulic/eng1-pump-fault", 0);
|
||||||
|
@ -81,14 +78,8 @@ var hyd_init = func {
|
||||||
setprop("/systems/hydraulic/elec-pump-b-fault", 0);
|
setprop("/systems/hydraulic/elec-pump-b-fault", 0);
|
||||||
setprop("/systems/hydraulic/elec-pump-y-fault", 0);
|
setprop("/systems/hydraulic/elec-pump-y-fault", 0);
|
||||||
setprop("/systems/hydraulic/ptu-fault", 0);
|
setprop("/systems/hydraulic/ptu-fault", 0);
|
||||||
hyd_timer.start();
|
},
|
||||||
}
|
loop: func() {
|
||||||
|
|
||||||
#######################
|
|
||||||
# Main Hydraulic Loop #
|
|
||||||
#######################
|
|
||||||
|
|
||||||
var master_hyd = func {
|
|
||||||
eng1_pump_sw = getprop("/controls/hydraulic/eng1-pump");
|
eng1_pump_sw = getprop("/controls/hydraulic/eng1-pump");
|
||||||
eng2_pump_sw = getprop("/controls/hydraulic/eng2-pump");
|
eng2_pump_sw = getprop("/controls/hydraulic/eng2-pump");
|
||||||
elec_pump_blue_sw = getprop("/controls/hydraulic/elec-pump-blue");
|
elec_pump_blue_sw = getprop("/controls/hydraulic/elec-pump-blue");
|
||||||
|
@ -134,19 +125,19 @@ var master_hyd = func {
|
||||||
|
|
||||||
if ((elec_pump_blue_sw and dc_ess >= 25 and !blue_pump_fail) and (stateL == 3 or stateR == 3) and !blue_leak) {
|
if ((elec_pump_blue_sw and dc_ess >= 25 and !blue_pump_fail) and (stateL == 3 or stateR == 3) and !blue_leak) {
|
||||||
if (blue_psi < 2900) {
|
if (blue_psi < 2900) {
|
||||||
setprop("/systems/hydraulic/blue-psi", blue_psi + 100);
|
setprop("/systems/hydraulic/blue-psi", blue_psi + 50);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/blue-psi", 3000);
|
setprop("/systems/hydraulic/blue-psi", 3000);
|
||||||
}
|
}
|
||||||
} else if (gs >= 100 and rat and !blue_leak) {
|
} else if (gs >= 50 and rat and !blue_leak) {
|
||||||
if (blue_psi < 2400) {
|
if (blue_psi < 2400) {
|
||||||
setprop("/systems/hydraulic/blue-psi", blue_psi + 100);
|
setprop("/systems/hydraulic/blue-psi", blue_psi + 50);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/blue-psi", 2500);
|
setprop("/systems/hydraulic/blue-psi", 2250);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (blue_psi > 1) {
|
if (blue_psi > 1) {
|
||||||
setprop("/systems/hydraulic/blue-psi", blue_psi - 50);
|
setprop("/systems/hydraulic/blue-psi", blue_psi - 25);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/blue-psi", 0);
|
setprop("/systems/hydraulic/blue-psi", 0);
|
||||||
}
|
}
|
||||||
|
@ -154,19 +145,19 @@ var master_hyd = func {
|
||||||
|
|
||||||
if ((eng1_pump_sw and stateL == 3 and !green_pump_fail) and !green_leak) {
|
if ((eng1_pump_sw and stateL == 3 and !green_pump_fail) and !green_leak) {
|
||||||
if (green_psi < 2900) {
|
if (green_psi < 2900) {
|
||||||
setprop("/systems/hydraulic/green-psi", green_psi + 100);
|
setprop("/systems/hydraulic/green-psi", green_psi + 50);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/green-psi", 3000);
|
setprop("/systems/hydraulic/green-psi", 3000);
|
||||||
}
|
}
|
||||||
} else if ((ptu_active and stateL != 3 and !ptu_fail) and !green_leak) {
|
} else if ((ptu_active and stateL != 3 and !ptu_fail) and !green_leak) {
|
||||||
if (green_psi < 2900) {
|
if (green_psi < 2900) {
|
||||||
setprop("/systems/hydraulic/green-psi", green_psi + 100);
|
setprop("/systems/hydraulic/green-psi", green_psi + 50);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/green-psi", 3000);
|
setprop("/systems/hydraulic/green-psi", 3000);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (green_psi > 1) {
|
if (green_psi > 1) {
|
||||||
setprop("/systems/hydraulic/green-psi", green_psi - 50);
|
setprop("/systems/hydraulic/green-psi", green_psi - 25);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/green-psi", 0);
|
setprop("/systems/hydraulic/green-psi", 0);
|
||||||
}
|
}
|
||||||
|
@ -174,31 +165,31 @@ var master_hyd = func {
|
||||||
|
|
||||||
if ((eng2_pump_sw and stateR == 3 and !yellow_pump_eng_fail) and !yellow_leak) {
|
if ((eng2_pump_sw and stateR == 3 and !yellow_pump_eng_fail) and !yellow_leak) {
|
||||||
if (yellow_psi < 2900) {
|
if (yellow_psi < 2900) {
|
||||||
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 100);
|
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/yellow-psi", 3000);
|
setprop("/systems/hydraulic/yellow-psi", 3000);
|
||||||
}
|
}
|
||||||
} else if ((elec_pump_yellow_sw and dc_ess >= 25 and !yellow_pump_elec_fail) and !yellow_leak) {
|
} else if ((elec_pump_yellow_sw and dc_ess >= 25 and !yellow_pump_elec_fail) and !yellow_leak) {
|
||||||
if (yellow_psi < 2900) {
|
if (yellow_psi < 2900) {
|
||||||
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 100);
|
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/yellow-psi", 3000);
|
setprop("/systems/hydraulic/yellow-psi", 3000);
|
||||||
}
|
}
|
||||||
} else if ((ptu_active and stateR != 3 and !ptu_fail) and !yellow_leak) {
|
} else if ((ptu_active and stateR != 3 and !ptu_fail) and !yellow_leak) {
|
||||||
if (yellow_psi < 2900) {
|
if (yellow_psi < 2900) {
|
||||||
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 100);
|
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/yellow-psi", 3000);
|
setprop("/systems/hydraulic/yellow-psi", 3000);
|
||||||
}
|
}
|
||||||
} else if (yellow_hand_pump and !yellow_leak and (getprop("/gear/gear[0]/wow") or getprop("/gear/gear[1]/wow") or getprop("/gear/gear[2]/wow"))) {
|
} else if (yellow_hand_pump and !yellow_leak and (getprop("/gear/gear[0]/wow") or getprop("/gear/gear[1]/wow") or getprop("/gear/gear[2]/wow"))) {
|
||||||
if (yellow_psi < 2900) {
|
if (yellow_psi < 2900) {
|
||||||
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50);
|
setprop("/systems/hydraulic/yellow-psi", yellow_psi + 25);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/yellow-psi", 3000);
|
setprop("/systems/hydraulic/yellow-psi", 3000);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (yellow_psi > 1) {
|
if (yellow_psi > 1) {
|
||||||
setprop("/systems/hydraulic/yellow-psi", yellow_psi - 50);
|
setprop("/systems/hydraulic/yellow-psi", yellow_psi - 25);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/yellow-psi", 0);
|
setprop("/systems/hydraulic/yellow-psi", 0);
|
||||||
}
|
}
|
||||||
|
@ -260,11 +251,8 @@ var master_hyd = func {
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/hydraulic/elec-pump-y-fault", 0);
|
setprop("/systems/hydraulic/elec-pump-y-fault", 0);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
};
|
||||||
#######################
|
|
||||||
# Various Other Stuff #
|
|
||||||
#######################
|
|
||||||
|
|
||||||
setlistener("/controls/gear/gear-down", func {
|
setlistener("/controls/gear/gear-down", func {
|
||||||
down = getprop("/controls/gear/gear-down");
|
down = getprop("/controls/gear/gear-down");
|
||||||
|
@ -272,22 +260,3 @@ setlistener("/controls/gear/gear-down", func {
|
||||||
setprop("/controls/gear/gear-down", 1);
|
setprop("/controls/gear/gear-down", 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
###################
|
|
||||||
# Update Function #
|
|
||||||
###################
|
|
||||||
|
|
||||||
var update_hydraulic = func {
|
|
||||||
master_hyd();
|
|
||||||
}
|
|
||||||
|
|
||||||
var hyd_timer = maketimer(0.2, update_hydraulic);
|
|
||||||
|
|
||||||
|
|
||||||
# FIXME:
|
|
||||||
# Josh, please disable braking when:
|
|
||||||
# /systems/hydraulic/brakes/accumulator-pressure-psi is equal to 0 and when /systems/hydraulic/brakes/mode is equal to 2
|
|
||||||
# Thanks!
|
|
||||||
|
|
||||||
# Will do -JD
|
|
||||||
|
|
||||||
|
|
|
@ -199,16 +199,16 @@ var triggerDoor = func(door, doorName, doorDesc) {
|
||||||
|
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
fbw.fctlInit();
|
fbw.fctlInit();
|
||||||
systems.elec_init();
|
systems.ELEC.init();
|
||||||
systems.adirs_init();
|
systems.PNEU.init();
|
||||||
systems.pneu_init();
|
systems.HYD.init();
|
||||||
systems.hyd_init();
|
systems.FUEL.init();
|
||||||
systems.fuel_init();
|
systems.ADIRS.init();
|
||||||
systems.fire_init();
|
|
||||||
systems.eng_init();
|
systems.eng_init();
|
||||||
|
systems.fire_init();
|
||||||
systems.autobrake_init();
|
systems.autobrake_init();
|
||||||
fmgc.APinit();
|
fmgc.APinit();
|
||||||
librariesLoop.start();
|
systemsLoop.start();
|
||||||
fmgc.FMGCinit();
|
fmgc.FMGCinit();
|
||||||
mcdu1.MCDU_init();
|
mcdu1.MCDU_init();
|
||||||
mcdu2.MCDU_init();
|
mcdu2.MCDU_init();
|
||||||
|
@ -217,14 +217,19 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/IDG-A32X/Systems/autopilot-dlg.xml");
|
var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/IDG-A32X/Systems/autopilot-dlg.xml");
|
||||||
setprop("/it-autoflight/input/fd1", 1);
|
setprop("/it-autoflight/input/fd1", 1);
|
||||||
setprop("/it-autoflight/input/fd2", 1);
|
setprop("/it-autoflight/input/fd2", 1);
|
||||||
setprop("/sim/model/lights/floor-light", 0);
|
|
||||||
libraries.ECAMinit();
|
libraries.ECAMinit();
|
||||||
libraries.variousReset();
|
libraries.variousReset();
|
||||||
logoTimer.start();
|
logoTimer.start();
|
||||||
noseLoop.start();
|
noseLoop.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
var librariesLoop = maketimer(0.1, func {
|
var systemsLoop = maketimer(0.1, func {
|
||||||
|
systems.ELEC.loop();
|
||||||
|
systems.PNEU.loop();
|
||||||
|
systems.HYD.loop();
|
||||||
|
systems.FUEL.loop();
|
||||||
|
systems.ADIRS.loop();
|
||||||
|
|
||||||
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/switches/cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or getprop("/controls/gear/brake-parking") == 0)) {
|
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/switches/cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or getprop("/controls/gear/brake-parking") == 0)) {
|
||||||
setprop("/controls/switches/cart", 0);
|
setprop("/controls/switches/cart", 0);
|
||||||
setprop("/controls/pneumatic/switches/groundair", 0);
|
setprop("/controls/pneumatic/switches/groundair", 0);
|
||||||
|
|
|
@ -5,10 +5,6 @@
|
||||||
# Copyright (c) Joshua Davidson (it0uchpods) #
|
# Copyright (c) Joshua Davidson (it0uchpods) #
|
||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
#############
|
|
||||||
# Init Vars #
|
|
||||||
#############
|
|
||||||
|
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
var altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||||
var bleed1_sw = getprop("/controls/pneumatic/switches/bleed1");
|
var bleed1_sw = getprop("/controls/pneumatic/switches/bleed1");
|
||||||
|
@ -78,7 +74,8 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var guard = getprop("/controls/oxygen/masksGuard");
|
var guard = getprop("/controls/oxygen/masksGuard");
|
||||||
});
|
});
|
||||||
|
|
||||||
var pneu_init = func {
|
var PNEU = {
|
||||||
|
init: func() {
|
||||||
setprop("/controls/pneumatic/switches/bleed1", 1);
|
setprop("/controls/pneumatic/switches/bleed1", 1);
|
||||||
setprop("/controls/pneumatic/switches/bleed2", 1);
|
setprop("/controls/pneumatic/switches/bleed2", 1);
|
||||||
setprop("/controls/pneumatic/switches/bleedapu", 0);
|
setprop("/controls/pneumatic/switches/bleedapu", 0);
|
||||||
|
@ -142,14 +139,8 @@ var pneu_init = func {
|
||||||
setprop("/controls/oxygen/masksDeployMan", 0);
|
setprop("/controls/oxygen/masksDeployMan", 0);
|
||||||
setprop("/controls/oxygen/masksReset", 0); # this is the TMR RESET pb on the maintenance panel, needs 3D model
|
setprop("/controls/oxygen/masksReset", 0); # this is the TMR RESET pb on the maintenance panel, needs 3D model
|
||||||
setprop("/controls/oxygen/masksSys", 0);
|
setprop("/controls/oxygen/masksSys", 0);
|
||||||
pneu_timer.start();
|
},
|
||||||
}
|
loop: func() {
|
||||||
|
|
||||||
#######################
|
|
||||||
# Main Pneumatic Loop #
|
|
||||||
#######################
|
|
||||||
|
|
||||||
var master_pneu = func {
|
|
||||||
bleed1_sw = getprop("/controls/pneumatic/switches/bleed1");
|
bleed1_sw = getprop("/controls/pneumatic/switches/bleed1");
|
||||||
bleed2_sw = getprop("/controls/pneumatic/switches/bleed2");
|
bleed2_sw = getprop("/controls/pneumatic/switches/bleed2");
|
||||||
bleedapu_sw = getprop("/controls/pneumatic/switches/bleedapu");
|
bleedapu_sw = getprop("/controls/pneumatic/switches/bleedapu");
|
||||||
|
@ -380,7 +371,8 @@ var master_pneu = func {
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/pneumatic/pack2-fault", 0);
|
setprop("/systems/pneumatic/pack2-fault", 0);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
};
|
||||||
|
|
||||||
setlistener("/controls/pneumatic/switches/pack1", func {
|
setlistener("/controls/pneumatic/switches/pack1", func {
|
||||||
pack1_sw = getprop("/controls/pneumatic/switches/pack1");
|
pack1_sw = getprop("/controls/pneumatic/switches/pack1");
|
||||||
|
@ -456,13 +448,3 @@ var flashfault2 = func {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
###################
|
|
||||||
# Update Function #
|
|
||||||
###################
|
|
||||||
|
|
||||||
var update_pneumatic = func {
|
|
||||||
master_pneu();
|
|
||||||
}
|
|
||||||
|
|
||||||
var pneu_timer = maketimer(0.2, update_pneumatic);
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
4024
|
4027
|
Reference in a new issue