This commit is contained in:
omega13a 2017-06-10 09:33:15 -07:00
commit b00b202bfc
17 changed files with 1998 additions and 1007 deletions

View file

@ -443,7 +443,7 @@
<slats>0</slats>
</flight>
<gear>
<brake-parking type="bool">true</brake-parking>
<brake-parking type="bool">0</brake-parking>
<tiller-cmd-norm type="double">0</tiller-cmd-norm>
<tiller-enabled type="bool">0</tiller-enabled>
</gear>
@ -460,7 +460,7 @@
<overhead-panel-norm type="double">0.0</overhead-panel-norm>
<main-panel-pedestal-norm type="double">0.8</main-panel-pedestal-norm>
<strobe type="bool">0</strobe>
<taxi-light-switch type="bool">0</taxi-light-switch>
<taxi-light-switch type="float">0</taxi-light-switch>
</lighting>
<switches>
<!-- Smoking is bad :P -->
@ -515,36 +515,6 @@
</gear>
<systems>
<failures n="0">
<aileron-left type="bool">0</aileron-left>
<aileron-right type="bool">0</aileron-right>
<elevator-left type="bool">0</elevator-left>
<elevator-right type="bool">0</elevator-right>
<rudder type="bool">0</rudder>
<spoiler-left type="bool">0</spoiler-left>
<spoiler-right type="bool">0</spoiler-right>
<elec-ac-ess type="bool">0</elec-ac-ess>
<elec-batt1 type="bool">0</elec-batt1>
<elec-batt2 type="bool">0</elec-batt2>
<elec-galley type="bool">0</elec-galley>
<elec-genapu type="bool">0</elec-genapu>
<elec-gen1 type="bool">0</elec-gen1>
<elec-gen2 type="bool">0</elec-gen2>
<bleed-apu type="bool">0</bleed-apu>
<bleed-ext type="bool">0</bleed-ext>
<bleed-eng1 type="bool">0</bleed-eng1>
<bleed-eng2 type="bool">0</bleed-eng2>
<pack1 type="bool">0</pack1>
<pack2 type="bool">0</pack2>
<hyd-blue type="bool">0</hyd-blue>
<hyd-green type="bool">0</hyd-green>
<hyd-yellow type="bool">0</hyd-yellow>
<ptu type="bool">0</ptu>
<pump-blue type="bool">0</pump-blue>
<pump-green type="bool">0</pump-green>
<pump-yellow-eng type="bool">0</pump-yellow-eng>
<pump-yellow-elec type="bool">0</pump-yellow-elec>
</failures>
<fuel n="0">
<only-use-ctr-tank type="bool">0</only-use-ctr-tank>
<tank n="2">

View file

@ -18,59 +18,19 @@ var spinning = maketimer(0.05, func {
}
});
setprop("/systems/acconfig/autoconfig-running", 0);
setprop("/systems/acconfig/spinning", 0);
setprop("/systems/acconfig/spin", "-");
var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/A320Family/AircraftConfig/main.xml");
var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/A320Family/AircraftConfig/welcome.xml");
var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/A320Family/AircraftConfig/psload.xml");
var ps_loaded_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psloaded/dialog", "Aircraft/A320Family/AircraftConfig/psloaded.xml");
var init_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/init/dialog", "Aircraft/A320Family/AircraftConfig/ac_init.xml");
var help_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/help/dialog", "Aircraft/A320Family/AircraftConfig/help.xml");
var fbw_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fbw/dialog", "Aircraft/A320Family/AircraftConfig/fbw.xml");
var fail_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fail/dialog", "Aircraft/A320Family/AircraftConfig/fail.xml");
var fail_b_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/failb/dialog", "Aircraft/A320Family/AircraftConfig/fail-b.xml");
spinning.start();
init_dlg.open();
setlistener("/sim/signals/fdm-initialized", func {
init_dlg.close();
welcome_dlg.open();
spinning.stop();
});
var saveSettings = func {
aircraft.data.add("/options/pfd/sidestick-pos", "/controls/adirs/skip");
aircraft.data.save();
}
saveSettings();
var systemsReset = func {
systems.elec_init();
systems.ADIRSreset();
systems.pneu_init();
systems.hyd_init();
systems.press_init();
systems.fuel_init();
fmgc.FMGCinit();
mcdu1.MCDU_reset();
mcdu2.MCDU_reset();
fmgc.APinit();
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
libraries.ECAMinit();
libraries.variousReset();
}
var failReset = func {
setprop("/systems/failures/elac1", 0);
setprop("/systems/failures/elac2", 0);
setprop("/systems/failures/sec1", 0);
setprop("/systems/failures/sec2", 0);
setprop("/systems/failures/sec3", 0);
setprop("/systems/failures/fac1", 0);
setprop("/systems/failures/fac2", 0);
setprop("/systems/failures/aileron-left", 0);
setprop("/systems/failures/aileron-right", 0);
setprop("/systems/failures/elevator-left", 0);
setprop("/systems/failures/elevator-right", 0);
setprop("/systems/failures/rudder", 0);
setprop("/systems/failures/spoiler-left", 0);
setprop("/systems/failures/spoiler-right", 0);
setprop("/systems/failures/elec-ac-ess", 0);
setprop("/systems/failures/elec-batt1", 0);
setprop("/systems/failures/elec-batt2", 0);
@ -94,19 +54,52 @@ var failReset = func {
setprop("/systems/failures/pump-yellow-elec", 0);
}
var failPage = func(page) {
if (page == 0) {
gui.popupTip("This is the first page!");
} else if (page == 1) {
fail_dlg.open();
fail_b_dlg.close();
} else if (page == 2) {
fail_dlg.close();
fail_b_dlg.open();
# fail_c_dlg.open(); # Fail C Doesn't exist yet!!! :)
} else if (page == 3) {
gui.popupTip("No Moar!");
setprop("/systems/failures/spoiler-left", 0);
setprop("/systems/failures/spoiler-right", 0);
failReset();
setprop("/systems/acconfig/autoconfig-running", 0);
setprop("/systems/acconfig/spinning", 0);
setprop("/systems/acconfig/spin", "-");
var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/A320Family/AircraftConfig/main.xml");
var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/A320Family/AircraftConfig/welcome.xml");
var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/A320Family/AircraftConfig/psload.xml");
var ps_loaded_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psloaded/dialog", "Aircraft/A320Family/AircraftConfig/psloaded.xml");
var init_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/init/dialog", "Aircraft/A320Family/AircraftConfig/ac_init.xml");
var help_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/help/dialog", "Aircraft/A320Family/AircraftConfig/help.xml");
var fbw_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fbw/dialog", "Aircraft/A320Family/AircraftConfig/fbw.xml");
var fail_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fail/dialog", "Aircraft/A320Family/AircraftConfig/fail.xml");
spinning.start();
init_dlg.open();
setlistener("/sim/signals/fdm-initialized", func {
init_dlg.close();
welcome_dlg.open();
spinning.stop();
});
var saveSettings = func {
aircraft.data.add("/options/pfd/sidestick-pos", "/controls/adirs/skip");
aircraft.data.save();
}
saveSettings();
var systemsReset = func {
fbw.fctlInit();
systems.elec_init();
systems.ADIRSreset();
systems.pneu_init();
systems.hyd_init();
systems.press_init();
systems.fuel_init();
fmgc.FMGCinit();
mcdu1.MCDU_reset();
mcdu2.MCDU_reset();
fmgc.APinit();
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
libraries.ECAMinit();
libraries.variousReset();
}
################
@ -130,6 +123,7 @@ var colddark = func {
libraries.flaptimer.stop();
setprop("/controls/flight/speedbrake-arm", 0);
setprop("/controls/gear/gear-down", 1);
setprop("/controls/flight/elevator-trim", 0);
systemsReset();
failReset();
if (getprop("/engines/engine[1]/n2") < 2) {
@ -174,6 +168,7 @@ var beforestart = func {
libraries.flaptimer.stop();
setprop("/controls/flight/speedbrake-arm", 0);
setprop("/controls/gear/gear-down", 1);
setprop("/controls/flight/elevator-trim", 0);
systemsReset();
failReset();
setprop("/controls/APU/master", 0);
@ -249,6 +244,7 @@ var taxi = func {
libraries.flaptimer.stop();
setprop("/controls/flight/speedbrake-arm", 0);
setprop("/controls/gear/gear-down", 1);
setprop("/controls/flight/elevator-trim", 0);
systemsReset();
failReset();
setprop("/controls/APU/master", 0);

View file

@ -1,158 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- A3XX Aircraft Config Dialog -->
<PropertyList>
<name>aircraft-config-failb</name>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>System Failures (2)</label>
</text>
<button>
<halign>right</halign>
<pref-width>20</pref-width>
<pref-height>20</pref-height>
<legend>X</legend>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<halign>left</halign>
<label>Failed when Checked</label>
</text>
<group>
<layout>hbox</layout>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>PNEU SYS Fail</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<checkbox>
<label>Bleed APU</label>
<halign>left</halign>
<property>/systems/failures/bleed-apu</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Bleed EXT</label>
<halign>left</halign>
<property>/systems/failures/bleed-ext</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Bleed ENG 1</label>
<halign>left</halign>
<property>/systems/failures/bleed-eng1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Bleed ENG 2</label>
<halign>left</halign>
<property>/systems/failures/bleed-eng2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Pack 1</label>
<halign>left</halign>
<property>/systems/failures/pack1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Pack 2</label>
<halign>left</halign>
<property>/systems/failures/pack2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<hrule/>
<group>
<layout>hbox</layout>
<button>
<legend>&lt;</legend>
<halign>center</halign>
<pref-width>30</pref-width>
<binding>
<command>nasal</command>
<script>
acconfig.failPage(1);
</script>
</binding>
</button>
<button>
<legend>Reset All</legend>
<halign>center</halign>
<padding>5</padding>
<binding>
<command>nasal</command>
<script>
acconfig.failReset();
</script>
</binding>
</button>
<button>
<legend>&gt;</legend>
<halign>center</halign>
<pref-width>30</pref-width>
<binding>
<command>nasal</command>
<script>
acconfig.failPage(3);
</script>
</binding>
</button>
</group>
</group>
</PropertyList>

View file

@ -28,14 +28,17 @@
<hrule/>
<group>
<layout>vbox</layout>
<text>
<halign>left</halign>
<label>Failed when Checked</label>
</text>
<group>
<layout>hbox</layout>
<group>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
@ -101,9 +104,9 @@
</checkbox>
<checkbox>
<label>Spoiler Left</label>
<label>ELAC1</label>
<halign>left</halign>
<property>/systems/failures/spoiler-left</property>
<property>/systems/failures/elac1</property>
<binding>
<command>dialog-apply</command>
</binding>
@ -111,9 +114,59 @@
</checkbox>
<checkbox>
<label>Spoiler Right</label>
<label>ELAC2</label>
<halign>left</halign>
<property>/systems/failures/spoiler-right</property>
<property>/systems/failures/elac2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>SEC1</label>
<halign>left</halign>
<property>/systems/failures/sec1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>SEC2</label>
<halign>left</halign>
<property>/systems/failures/sec2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>SEC3</label>
<halign>left</halign>
<property>/systems/failures/sec3</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>FAC2</label>
<halign>left</halign>
<property>/systems/failures/fac2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>FAC1</label>
<halign>left</halign>
<property>/systems/failures/fac1</property>
<binding>
<command>dialog-apply</command>
</binding>
@ -204,6 +257,13 @@
<live>true</live>
</checkbox>
</group>
<vrule/>
<group>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
@ -288,27 +348,87 @@
<live>true</live>
</checkbox>
<hrule/>
<group>
<layout>hbox</layout>
<button>
<legend>&lt;</legend>
<halign>center</halign>
<pref-width>30</pref-width>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>PNEU SYS Fail</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<checkbox>
<label>Bleed APU</label>
<halign>left</halign>
<property>/systems/failures/bleed-apu</property>
<binding>
<command>nasal</command>
<script>
acconfig.failPage(0);
</script>
<command>dialog-apply</command>
</binding>
</button>
<live>true</live>
</checkbox>
<checkbox>
<label>Bleed EXT</label>
<halign>left</halign>
<property>/systems/failures/bleed-ext</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Bleed ENG 1</label>
<halign>left</halign>
<property>/systems/failures/bleed-eng1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Bleed ENG 2</label>
<halign>left</halign>
<property>/systems/failures/bleed-eng2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Pack 1</label>
<halign>left</halign>
<property>/systems/failures/pack1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Pack 2</label>
<halign>left</halign>
<property>/systems/failures/pack2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<hrule/>
<button>
<legend>Reset All</legend>
<halign>center</halign>
<padding>5</padding>
<pref-width>120</pref-width>
<binding>
<command>nasal</command>
<script>
@ -317,18 +437,6 @@
</binding>
</button>
<button>
<legend>&gt;</legend>
<halign>center</halign>
<pref-width>30</pref-width>
<binding>
<command>nasal</command>
<script>
acconfig.failPage(2);
</script>
</binding>
</button>
</group>
</group>

View file

@ -2167,7 +2167,7 @@
<type>rotate</type>
<object-name>trim_wheel</object-name>
<property>/controls/flight/elevator-trim</property>
<factor>-700</factor>
<factor>-100</factor>
<center>
<x-m>-0.2373</x-m>
<y-m>0</y-m>

View file

@ -13,14 +13,26 @@
<object-name>ACPack1Btn2O</object-name>
<object-name>ACPack2Btn1F</object-name>
<object-name>ACPack2Btn2O</object-name>
<object-name>APUBleedBtn1F</object-name>
<object-name>APUBleedBtn2O</object-name>
<object-name>APUGenBtn1F</object-name>
<object-name>APUGenBtn2O</object-name>
<object-name>APUMasterBtn1F</object-name>
<object-name>APUMasterBtn2O</object-name>
<object-name>APUStartBtn1A</object-name>
<object-name>APUStartBtn2O</object-name>
<object-name>BatteryBtn11F</object-name>
<object-name>BatteryBtn12O</object-name>
<object-name>BatteryBtn21F</object-name>
<object-name>BatteryBtn22O</object-name>
<object-name>BusTieBtn2O</object-name>
<object-name>DitchBtn2O</object-name>
<object-name>ExtPwrBtn2O</object-name>
<object-name>Gen1Btn1F</object-name>
<object-name>Gen1Btn2O</object-name>
<object-name>Gen2Btn1F</object-name>
<object-name>Gen2Btn2O</object-name>
<object-name>RamAirBtn2O</object-name>
<condition>
<or>
<greater-than-equals>
@ -47,14 +59,6 @@
<type>select</type>
<object-name>ACESSFeedBtn1F</object-name>
<object-name>ACESSFeedBtn2O</object-name>
<object-name>APUBleedBtn1F</object-name>
<object-name>APUBleedBtn2O</object-name>
<object-name>APUGenBtn1F</object-name>
<object-name>APUGenBtn2O</object-name>
<object-name>APUMasterBtn1F</object-name>
<object-name>APUMasterBtn2O</object-name>
<object-name>APUStartBtn1A</object-name>
<object-name>APUStartBtn2O</object-name>
<object-name>ADR1Btn1F</object-name>
<object-name>ADR1Btn2O</object-name>
<object-name>ADR2Btn1F</object-name>
@ -63,7 +67,6 @@
<object-name>ADR3Btn2O</object-name>
<object-name>BlueElecPump1F</object-name>
<object-name>BlueElecPump2O</object-name>
<object-name>BusTieBtn2O</object-name>
<object-name>CFuelTank1Btn1F</object-name>
<object-name>CFuelTank1Btn2O</object-name>
<object-name>CFuelTank2Btn1F</object-name>
@ -72,7 +75,6 @@
<object-name>Eng1BleedBtn2O</object-name>
<object-name>Eng2BleedBtn1F</object-name>
<object-name>Eng2BleedBtn2O</object-name>
<object-name>ExtPwrBtn2O</object-name>
<object-name>FuelModeBtn1F</object-name>
<object-name>FuelModeBtn2O</object-name>
<object-name>FuelXfeedBtn2O</object-name>
@ -149,7 +151,6 @@
</animation>
<!-- IRS 1 -->
<animation>
<type>pick</type>
<object-name>IR1ModeKnb</object-name>
@ -242,7 +243,6 @@
</animation>
<!-- IRS 2 -->
<animation>
<type>pick</type>
<object-name>IR2ModeKnb</object-name>
@ -335,7 +335,6 @@
</animation>
<!-- IRS 3 -->
<animation>
<type>pick</type>
<object-name>IR3ModeKnb</object-name>
@ -428,7 +427,6 @@
</animation>
<!-- IR Display Data Knob -->
<animation>
<type>pick</type>
<object-name>IRDisplayDataKnb</object-name>
@ -497,7 +495,6 @@
</animation>
<!-- IRS Display Select Knob -->
<animation>
<type>pick</type>
<object-name>IRDisplaySelectKnb</object-name>
@ -589,6 +586,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/adirs/adr[0]/off</property>
</binding>
@ -644,6 +653,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/adirs/adr[1]/off</property>
</binding>
@ -699,6 +720,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/adirs/adr[2]/off</property>
</binding>
@ -994,6 +1027,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/hydraulic/eng1-pump</property>
</binding>
@ -1046,6 +1091,26 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/hydraulic/rat-man</property>
</binding>
@ -1067,6 +1132,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/hydraulic/elec-pump-blue</property>
</binding>
@ -1122,6 +1199,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/hydraulic/ptu</property>
</binding>
@ -1177,6 +1266,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/hydraulic/eng2-pump</property>
</binding>
@ -1232,6 +1333,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/hydraulic/elec-pump-yellow</property>
</binding>
@ -1287,6 +1400,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/fuel/x-feed</property>
</binding>
@ -1341,6 +1466,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/fuel/tank2pump1</property>
</binding>
@ -1394,6 +1531,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/fuel/tank2pump2</property>
</binding>
@ -1447,6 +1596,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/fuel/tank3pump1</property>
</binding>
@ -1499,6 +1660,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/fuel/mode</property>
</binding>
@ -1552,6 +1725,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/fuel/tank3pump2</property>
</binding>
@ -1605,6 +1790,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/fuel/tank4pump1</property>
</binding>
@ -1658,6 +1855,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/fuel/tank4pump2</property>
</binding>
@ -1712,6 +1921,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/electrical/switches/galley</property>
</binding>
@ -1876,6 +2097,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/systems/unused/unused-oh</property>
</binding>
@ -1910,6 +2143,26 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/electrical/switches/gen1</property>
</binding>
@ -1974,6 +2227,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/electrical/switches/ac-ess-feed</property>
</binding>
@ -2029,6 +2294,26 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/electrical/switches/gen-apu</property>
</binding>
@ -2080,6 +2365,26 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/electrical/switches/apu-ext-crosstie</property>
</binding>
@ -2177,6 +2482,26 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/electrical/switches/gen2</property>
</binding>
@ -2241,6 +2566,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/systems/unused/unused-oh</property>
</binding>
@ -2335,6 +2672,26 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/pneumatic/switches/pack1</property>
</binding>
@ -2354,6 +2711,16 @@
<property>/systems/failures/pack1</property>
<value>1</value>
</equals>
<and>
<equals>
<property>/controls/pneumatic/switches/pack1</property>
<value>1</value>
</equals>
<less-than-equals>
<property>/systems/pneumatic/pack1</property>
<value>5</value>
</less-than-equals>
</and>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
@ -2390,6 +2757,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/pneumatic/switches/bleed1</property>
</binding>
@ -2445,6 +2824,26 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/pneumatic/switches/bleedapu</property>
</binding>
@ -2500,6 +2899,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/pneumatic/switches/bleed2</property>
</binding>
@ -2554,6 +2965,18 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/pneumatic/switches/hot-air</property>
</binding>
@ -2609,6 +3032,26 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/pneumatic/switches/pack2</property>
</binding>
@ -2628,6 +3071,16 @@
<property>/systems/failures/pack2</property>
<value>1</value>
</equals>
<and>
<equals>
<property>/controls/pneumatic/switches/pack2</property>
<value>1</value>
</equals>
<less-than-equals>
<property>/systems/pneumatic/pack2</property>
<value>5</value>
</less-than-equals>
</and>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
@ -2661,14 +3114,29 @@
<action>
<button>0</button>
<repeatable>false</repeatable>
<!--binding>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/pneumatic/switches/ram-air</property>
</binding-->
<binding>
<command>property-assign</command>
<property>/controls/pneumatic/switches/ram-air</property>
<value>0</value>
</binding>
<binding>
<command>nasal</command>
@ -2694,6 +3162,127 @@
</condition>
</animation>
<!-- Cabin Pressurization -->
<animation>
<type>pick</type>
<object-name>CabinPressModeBtn</object-name>
<object-name>CabinPressModeBtn1F</object-name>
<object-name>CabinPressModeBtn2O</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<!--binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/pressurization/auto</property>
</binding-->
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/btn1", 1);</script>
</binding>
</action>
</animation>
<animation>
<type>select</type>
<object-name>CabinPressModeBtn1F</object-name>
<condition>
<or>
<equals>
<property>/systems/failures/pack2</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>CabinPressModeBtn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/pressurization/auto</property>
<value>0</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>pick</type>
<object-name>DitchBtn</object-name>
<object-name>DitchBtn2O</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<!--binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/ditching</property>
</binding-->
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/btn1", 1);</script>
</binding>
</action>
</animation>
<animation>
<type>select</type>
<object-name>DitchBtn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/pressurization/unused-oh-btn</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<!-- Exterior lights -->
<animation>
<name>Strobe lights pick</name>
@ -2985,6 +3574,26 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/APU/master</property>
</binding>
@ -3040,6 +3649,26 @@
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>nasal</command>
<script>
if (getprop("/controls/APU/master") == 1) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 147 KiB

File diff suppressed because it is too large Load diff

View file

@ -13,13 +13,13 @@ var ac_hz_std = 400;
var elec_init = func {
setprop("/controls/switches/annun-test", 0);
setprop("/controls/electrical/switches/galley", 0);
setprop("/controls/electrical/switches/galley", 1);
setprop("/controls/electrical/switches/idg1", 0);
setprop("/controls/electrical/switches/idg2", 0);
setprop("/controls/electrical/switches/gen1", 0);
setprop("/controls/electrical/switches/gen2", 0);
setprop("/controls/electrical/switches/gen1", 1);
setprop("/controls/electrical/switches/gen2", 1);
setprop("/controls/electrical/switches/emer-gen", 0);
setprop("/controls/electrical/switches/gen-apu", 0);
setprop("/controls/electrical/switches/gen-apu", 1);
setprop("/controls/electrical/switches/gen-ext", 0);
setprop("/controls/electrical/switches/apu-ext-crosstie", 1);
setprop("/controls/electrical/switches/ac-ess-feed", 1);

View file

@ -6,9 +6,9 @@
#############
var hyd_init = func {
setprop("/controls/hydraulic/eng1-pump", 0);
setprop("/controls/hydraulic/eng2-pump", 0);
setprop("/controls/hydraulic/elec-pump-blue", 0);
setprop("/controls/hydraulic/eng1-pump", 1);
setprop("/controls/hydraulic/eng2-pump", 1);
setprop("/controls/hydraulic/elec-pump-blue", 1);
setprop("/controls/hydraulic/elec-pump-yellow", 0);
setprop("/controls/hydraulic/ptu", 1);
setprop("/controls/hydraulic/rat-man", 0);
@ -18,6 +18,7 @@ var hyd_init = func {
setprop("/systems/hydraulic/blue-psi", 0);
setprop("/systems/hydraulic/green-psi", 0);
setprop("/systems/hydraulic/yellow-psi", 0);
setprop("/controls/gear/brake-parking", 0);
hyd_timer.start();
}

View file

@ -1,5 +1,34 @@
# Airbus A3XX FBW System by Joshua Davidson (it0uchpods)
# V0.9.8
# Airbus A3XX FBW/Flight Control Computer System
# Joshua Davidson (it0uchpods)
# 2 ELevator and Aileron Computers (ELAC)
# Aileron Control
# Normal Elevator / Stab Trim Control
# 3 Spoiler Elevator Computers (SEC)
# Spoiler Control
# Standby Elevator / Stab Trim Control
# 2 Flight Agumentation Computers (FAC)
# Electric Rudder Control
# 2 Flight Control Data Concentrators (FCDC)
# Aquire data from ELAC and SEC and send it to the EIS and Centralized Fault Display System
# If All ELACs Fail, Alternate Law
var fctlInit = func {
setprop("/controls/fctl/elac1", 1);
setprop("/controls/fctl/elac2", 1);
setprop("/controls/fctl/sec1", 1);
setprop("/controls/fctl/sec2", 1);
setprop("/controls/fctl/sec3", 1);
setprop("/controls/fctl/fac1", 1);
setprop("/controls/fctl/fac2", 1);
setprop("/systems/fctl/elac1", 0);
setprop("/systems/fctl/elac2", 0);
setprop("/systems/fctl/sec1", 0);
setprop("/systems/fctl/sec2", 0);
setprop("/systems/fctl/fac1", 0);
setprop("/systems/fctl/fac2", 0);
}
###################
# Update Function #
@ -7,6 +36,64 @@
var update_loop = func {
var elac1_sw = getprop("/controls/fctl/elac1");
var elac2_sw = getprop("/controls/fctl/elac2");
var sec1_sw = getprop("/controls/fctl/sec1");
var sec2_sw = getprop("/controls/fctl/sec2");
var sec3_sw = getprop("/controls/fctl/sec3");
var fac1_sw = getprop("/controls/fctl/fac1");
var fac2_sw = getprop("/controls/fctl/fac2");
var elac1_fail = getprop("/systems/failures/elac1");
var elac2_fail = getprop("/systems/failures/elac2");
var sec1_fail = getprop("/systems/failures/sec1");
var sec2_fail = getprop("/systems/failures/sec2");
var sec3_fail = getprop("/systems/failures/sec3");
var fac1_fail = getprop("/systems/failures/fac1");
var fac2_fail = getprop("/systems/failures/fac2");
if (elac1_sw and !elac1_fail) {
setprop("/systems/fctl/elac1", 1);
} else {
setprop("/systems/fctl/elac1", 0);
}
if (elac2_sw and !elac2_fail) {
setprop("/systems/fctl/elac2", 1);
} else {
setprop("/systems/fctl/elac2", 0);
}
if (sec1_sw and !sec1_fail) {
setprop("/systems/fctl/sec1", 1);
} else {
setprop("/systems/fctl/sec1", 0);
}
if (sec2_sw and !sec2_fail) {
setprop("/systems/fctl/sec2", 1);
} else {
setprop("/systems/fctl/sec2", 0);
}
if (sec3_sw and !sec3_fail) {
setprop("/systems/fctl/sec3", 1);
} else {
setprop("/systems/fctl/sec3", 0);
}
if (fac1_sw and !fac1_fail) {
setprop("/systems/fctl/fac1", 1);
} else {
setprop("/systems/fctl/fac1", 0);
}
if (fac2_sw and !fac2_fail) {
setprop("/systems/fctl/fac2", 1);
} else {
setprop("/systems/fctl/fac2", 0);
}
var ail = getprop("/controls/flight/aileron");
if (getprop("/it-fbw/law") == 0) {
@ -86,4 +173,4 @@ setlistener("/sim/signals/fdm-initialized", func {
##########
# Timers #
##########
var updatet = maketimer(0.01, update_loop);
var updatet = maketimer(0.05, update_loop);

View file

@ -157,6 +157,7 @@ var triggerDoor = func(door, doorName, doorDesc) {
#######################
setlistener("/sim/signals/fdm-initialized", func {
fbw.fctlInit();
systems.elec_init();
systems.adirs_init();
systems.pneu_init();

View file

@ -6,16 +6,17 @@
#############
var pneu_init = func {
setprop("/controls/pneumatic/switches/bleed1", 0);
setprop("/controls/pneumatic/switches/bleed2", 0);
setprop("/controls/pneumatic/switches/bleed1", 1);
setprop("/controls/pneumatic/switches/bleed2", 1);
setprop("/controls/pneumatic/switches/bleedapu", 0);
setprop("/controls/pneumatic/switches/groundair", 0);
setprop("/controls/pneumatic/switches/pack1", 0);
setprop("/controls/pneumatic/switches/pack2", 0);
setprop("/controls/pneumatic/switches/hot-air", 0);
setprop("/controls/pneumatic/switches/pack1", 1);
setprop("/controls/pneumatic/switches/pack2", 1);
setprop("/controls/pneumatic/switches/hot-air", 1);
setprop("/controls/pneumatic/switches/ram-air", 0);
setprop("/controls/pneumatic/switches/pack-flo", 9); # LO: 7, NORM: 9, HI: 11.
setprop("/controls/pneumatic/switches/xbleed", 1); # SHUT: 0, AUTO: 1, OPEN: 2. # I will simulate later, once I get the knob animated. -JD
setprop("/controls/pressurization/auto", 1);
setprop("/systems/pneumatic/bleed1", 0);
setprop("/systems/pneumatic/bleed2", 0);
setprop("/systems/pneumatic/bleedapu", 0);
@ -48,53 +49,9 @@ var press_init = func {
setprop("/systems/pressurization/diff-to-target", "0");
}
##############
# Main Loops #
##############
var master_press = func {
var phase = getprop("/FMGC/status/phase");
var pressmode = getprop("/systems/pressurization/mode");
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
var wowl = getprop("/gear/gear[1]/wow");
var wowr = getprop("/gear/gear[2]/wow");
var deltap = getprop("/systems/pressurization/deltap");
var outflow = getprop("/systems/pressurization/outflowpos");
var speed = getprop("/velocities/groundspeed-kt");
var cabinalt = getprop("/systems/pressurization/cabinalt");
var dep_apt = getprop("autopilot/route-manager/departure/airport");
var airport_dep_elev_ft = getprop("autopilot/route-manager/departure/field-elevation-ft");
var altitude = getprop("/position/altitude-ft");
var airport_arr_elev_ft = getprop("autopilot/route-manager/destination/field-elevation-ft");
var vs = getprop("/systems/pressurization/vs-norm");
var outflowpos = getprop("/systems/pressurization/outflowpos");
var cabinalt = getprop("/systems/pressurization/cabinalt");
var targetalt = getprop("/systems/pressurization/targetalt");
var targetvs = getprop("/systems/pressurization/targetvs");
var ambient = getprop("/systems/pressurization/ambientpsi");
var cabinpsi = getprop("/systems/pressurization/cabinpsi");
setprop("/systems/pressurization/diff-to-target", targetalt - cabinalt);
setprop("/systems/pressurization/deltap", cabinpsi - ambient);
# switch mode to TO
if ((pressmode == "GN") and (pressmode != "CL") and (wowl and wowr) and ((state1 == "MCT") or (state1 == "TOGA")) and ((state2 == "MCT") or (state2 == "TOGA"))) {
setprop("/systems/pressurization/mode", "TO");
}
# switch mode to CLB
if (((!wowl) or (!wowr)) and (speed > 100) and (pressmode == "TO")) {
setprop("/systems/pressurization/mode", "CL");
}
if (vs != targetvs and !wowl and !wowr) {
setprop("/systems/pressurization/vs", targetvs);
}
if (cabinalt != targetalt and !wowl and !wowr) {
setprop("/systems/pressurization/cabinalt", cabinalt + vs);
}
}
#######################
# Main Pneumatic Loop #
#######################
var master_pneu = func {
var bleed1_sw = getprop("/controls/pneumatic/switches/bleed1");
@ -156,7 +113,7 @@ var master_pneu = func {
setprop("/systems/pneumatic/pack1", 0);
}
if (pack2_sw == 1 and (bleed2 >= 20 or bleedapu >= 20 or ground >= 20) and eng1_starter == 0 and eng2_starter == 0 and !pack2_fail) {
if (pack2_sw == 1 and (bleed2 >= 20 or bleedapu >= 20) and eng1_starter == 0 and eng2_starter == 0 and !pack2_fail) {
setprop("/systems/pneumatic/pack2", pack_flo_sw);
} else {
setprop("/systems/pneumatic/pack2", 0);
@ -190,6 +147,47 @@ var master_pneu = func {
}
var total_psi = getprop("/systems/pneumatic/total-psi");
var phase = getprop("/FMGC/status/phase");
var pressmode = getprop("/systems/pressurization/mode");
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
var wowl = getprop("/gear/gear[1]/wow");
var wowr = getprop("/gear/gear[2]/wow");
var deltap = getprop("/systems/pressurization/deltap");
var outflow = getprop("/systems/pressurization/outflowpos");
var speed = getprop("/velocities/groundspeed-kt");
var cabinalt = getprop("/systems/pressurization/cabinalt");
var dep_apt = getprop("autopilot/route-manager/departure/airport");
var airport_dep_elev_ft = getprop("autopilot/route-manager/departure/field-elevation-ft");
var altitude = getprop("/position/altitude-ft");
var airport_arr_elev_ft = getprop("autopilot/route-manager/destination/field-elevation-ft");
var vs = getprop("/systems/pressurization/vs-norm");
var outflowpos = getprop("/systems/pressurization/outflowpos");
var cabinalt = getprop("/systems/pressurization/cabinalt");
var targetalt = getprop("/systems/pressurization/targetalt");
var targetvs = getprop("/systems/pressurization/targetvs");
var ambient = getprop("/systems/pressurization/ambientpsi");
var cabinpsi = getprop("/systems/pressurization/cabinpsi");
setprop("/systems/pressurization/diff-to-target", targetalt - cabinalt);
setprop("/systems/pressurization/deltap", cabinpsi - ambient);
if ((pressmode == "GN") and (pressmode != "CL") and (wowl and wowr) and ((state1 == "MCT") or (state1 == "TOGA")) and ((state2 == "MCT") or (state2 == "TOGA"))) {
setprop("/systems/pressurization/mode", "TO");
}
if (((!wowl) or (!wowr)) and (speed > 100) and (pressmode == "TO")) {
setprop("/systems/pressurization/mode", "CL");
}
if (vs != targetvs and !wowl and !wowr) {
setprop("/systems/pressurization/vs", targetvs);
}
if (cabinalt != targetalt and !wowl and !wowr) {
setprop("/systems/pressurization/cabinalt", cabinalt + vs);
}
}
###################
@ -198,7 +196,6 @@ var master_pneu = func {
var update_pneumatic = func {
master_pneu();
master_press();
}
var pneu_timer = maketimer(0.2, update_pneumatic);

BIN
Resources/fctlfail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

27
Resources/fctlfail.txt Normal file
View file

@ -0,0 +1,27 @@
PITCH ALT, ROLL DCT, YAW ALT
TRIPLE ADR FAILURE
DOUBLE HYD FAILURE
SLATS LOCKED IN CLEAN (CONF 0 or 1)
PITCH ALT (RED PROT), ROLL DCT, YAW ALT
DOUBLE ELAC FAILURE
SIDESTICK FAULT
DOUBLE ADR FAILURE
ALL SPOILERS LOST
THS JAMMED
3 SEC FAILED
ELAC 2 AND BLUE HYD FAILED
ELAC 1 AND GREEN HYD FAILED
ELAC 1 AND YELLOW HYD FAILED
ONE ELEV JAMMED
RAT OUT
PITCH ALT (RED PROT), ROLL DCT, YAW MECH
2 FAC FAILED
YAW DAMPER FAILED
Y+G HYD FAILED
PITCH DIRETCT, ROLL DIRECT, YAW ALT
RADIO ALT FAILED WHEN
LDG DOWN
or
CONF 2, with BOTH LGCIUs failed

View file

@ -270,7 +270,7 @@
<entry><ind>10000</ind><dep> 10.1</dep></entry>
<entry><ind>11000</ind><dep> 9.7</dep></entry>
<entry><ind>12000</ind><dep> 9.3</dep></entry>
<entry><ind> 13000</ind><dep> 9</dep></entry>
<entry><ind>13000</ind><dep> 9.0</dep></entry>
<entry><ind>14000</ind><dep> 8.6</dep></entry>
<entry><ind>15000</ind><dep> 8.3</dep></entry>
<entry><ind>16000</ind><dep> 8.0</dep></entry>
@ -290,6 +290,7 @@
<entry><ind>39000</ind><dep> 2.9</dep></entry>
<entry><ind>40000</ind><dep> 2.7</dep></entry>
<entry><ind>41000</ind><dep> 2.6</dep></entry>
<entry><ind>42000</ind><dep> 2.5</dep></entry>
</table>
</expression>
</input>