This commit is contained in:
Jonathan Redpath 2017-06-10 19:28:29 +01:00
commit 80d1f22289
18 changed files with 1755 additions and 953 deletions

View file

@ -189,8 +189,6 @@
<float n="6" alias="/controls/flight/aileron-left" />
<float n="7" alias="/controls/flight/aileron-right" />
<float n="8" alias="/controls/flight/rudder-fdm" />
<float n="9" alias="/controls/flight/spoiler-left" />
<float n="10" alias="/controls/flight/spoiler-right" />
<float n="11" alias="/fdm/jsbsim/fcs/slat-pos-norm" />
<int n="2" alias="/controls/lighting/landing-lights[0]" />
<int n="3" alias="/controls/lighting/landing-lights[1]" />
@ -434,9 +432,19 @@
<elevator-left>0.1</elevator-left>
<elevator-right>0.1</elevator-right>
<elevator-sum>0.2</elevator-sum>
<spoiler-left>0.0</spoiler-left>
<spoiler-l1>0.0</spoiler-l1>
<spoiler-l2>0.0</spoiler-l2>
<spoiler-l3>0.0</spoiler-l3>
<spoiler-l4>0.0</spoiler-l4>
<spoiler-l5>0.0</spoiler-l5>
<spoiler-l-sum>0.0</spoiler-l-sum>
<spoiler-output>0.0</spoiler-output>
<spoiler-right>0.0</spoiler-right>
<spoiler-r1>0.0</spoiler-r1>
<spoiler-r2>0.0</spoiler-r2>
<spoiler-r3>0.0</spoiler-r3>
<spoiler-r4>0.0</spoiler-r4>
<spoiler-r5>0.0</spoiler-r5>
<spoiler-r-sum>0.0</spoiler-r-sum>
<speedbrake-arm>0</speedbrake-arm>
<ground-spoilers-armed type="bool">0</ground-spoilers-armed>
<speedbrake-lever type="double">0</speedbrake-lever>
@ -515,36 +523,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">
@ -727,6 +705,36 @@
<value>0</value>
</binding>
<binding>
<condition>
<or>
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>1</value>
</equals>
</or>
</condition>
<command>property-cycle</command>
<property>controls/flight/speedbrake-lever</property>
<value>0</value>
<value>1</value>
</binding>
<binding>
<condition>
<and>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
</and>
</condition>
<command>property-cycle</command>
<property>controls/flight/speedbrake-lever</property>
<value>0</value>

View file

@ -18,59 +18,29 @@ 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/spoiler-l1", 0);
setprop("/systems/failures/spoiler-l2", 0);
setprop("/systems/failures/spoiler-l3", 0);
setprop("/systems/failures/spoiler-l4", 0);
setprop("/systems/failures/spoiler-l5", 0);
setprop("/systems/failures/spoiler-r1", 0);
setprop("/systems/failures/spoiler-r2", 0);
setprop("/systems/failures/spoiler-r3", 0);
setprop("/systems/failures/spoiler-r4", 0);
setprop("/systems/failures/spoiler-r5", 0);
setprop("/systems/failures/elec-ac-ess", 0);
setprop("/systems/failures/elec-batt1", 0);
setprop("/systems/failures/elec-batt2", 0);
@ -94,19 +64,50 @@ 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!");
}
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();
}
################

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,287 +28,407 @@
<hrule/>
<text>
<halign>left</halign>
<label>Failed when Checked</label>
</text>
<group>
<layout>vbox</layout>
<text>
<halign>left</halign>
<label>Failed when Checked</label>
</text>
<layout>hbox</layout>
<group>
<layout>hbox</layout>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>FCTL SYS Fail</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<checkbox>
<label>Aileron Left</label>
<halign>left</halign>
<property>/systems/failures/aileron-left</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Aileron Right</label>
<halign>left</halign>
<property>/systems/failures/aileron-right</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Elevator Left</label>
<halign>left</halign>
<property>/systems/failures/elevator-left</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Elevator Right</label>
<halign>left</halign>
<property>/systems/failures/elevator-right</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Rudder</label>
<halign>left</halign>
<property>/systems/failures/rudder</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Spoiler Left</label>
<halign>left</halign>
<property>/systems/failures/spoiler-left</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Spoiler Right</label>
<halign>left</halign>
<property>/systems/failures/spoiler-right</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<group>
<layout>hbox</layout>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>ELEC SYS Fail</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<checkbox>
<label>AC ESS Bus</label>
<halign>left</halign>
<property>/systems/failures/elec-ac-ess</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>APU GEN</label>
<halign>left</halign>
<property>/systems/failures/elec-genapu</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>BATT 1 Fail</label>
<halign>left</halign>
<property>/systems/failures/elec-batt1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>BATT 2 Fail</label>
<halign>left</halign>
<property>/systems/failures/elec-batt2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>ENG 1 GEN</label>
<halign>left</halign>
<property>/systems/failures/elec-gen1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>ENG 2 GEN</label>
<halign>left</halign>
<property>/systems/failures/elec-gen2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Galley Bus</label>
<halign>left</halign>
<property>/systems/failures/elec-galley</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<group>
<layout>hbox</layout>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>HYD SYS Fail</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<checkbox>
<label>Blue HYD Leak</label>
<halign>left</halign>
<property>/systems/failures/hyd-blue</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Blue ELEC Pump</label>
<halign>left</halign>
<property>/systems/failures/pump-blue</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Green HYD Leak</label>
<halign>left</halign>
<property>/systems/failures/hyd-green</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Green ENG 1 Pump</label>
<halign>left</halign>
<property>/systems/failures/pump-green</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Yellow HYD Leak</label>
<halign>left</halign>
<property>/systems/failures/hyd-yellow</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Yellow ENG 2 Pump</label>
<halign>left</halign>
<property>/systems/failures/pump-yellow-eng</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Yellow ELEC Pump</label>
<halign>left</halign>
<property>/systems/failures/pump-yellow-elec</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<hrule/>
<group>
<layout>hbox</layout>
<layout>vbox</layout>
<button>
<legend>&lt;</legend>
<halign>center</halign>
<pref-width>30</pref-width>
<group>
<layout>hbox</layout>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>FCTL SYS Fail</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<checkbox>
<label>Aileron Left</label>
<halign>left</halign>
<property>/systems/failures/aileron-left</property>
<binding>
<command>nasal</command>
<script>
acconfig.failPage(0);
</script>
<command>dialog-apply</command>
</binding>
</button>
<live>true</live>
</checkbox>
<checkbox>
<label>Aileron Right</label>
<halign>left</halign>
<property>/systems/failures/aileron-right</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Elevator Left</label>
<halign>left</halign>
<property>/systems/failures/elevator-left</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Elevator Right</label>
<halign>left</halign>
<property>/systems/failures/elevator-right</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Rudder</label>
<halign>left</halign>
<property>/systems/failures/rudder</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>ELAC1</label>
<halign>left</halign>
<property>/systems/failures/elac1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>ELAC2</label>
<halign>left</halign>
<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>
<live>true</live>
</checkbox>
<group>
<layout>hbox</layout>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>ELEC SYS Fail</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<checkbox>
<label>AC ESS Bus</label>
<halign>left</halign>
<property>/systems/failures/elec-ac-ess</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>APU GEN</label>
<halign>left</halign>
<property>/systems/failures/elec-genapu</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>BATT 1 Fail</label>
<halign>left</halign>
<property>/systems/failures/elec-batt1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>BATT 2 Fail</label>
<halign>left</halign>
<property>/systems/failures/elec-batt2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>ENG 1 GEN</label>
<halign>left</halign>
<property>/systems/failures/elec-gen1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>ENG 2 GEN</label>
<halign>left</halign>
<property>/systems/failures/elec-gen2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Galley Bus</label>
<halign>left</halign>
<property>/systems/failures/elec-galley</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
</group>
<vrule/>
<group>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>HYD SYS Fail</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<checkbox>
<label>Blue HYD Leak</label>
<halign>left</halign>
<property>/systems/failures/hyd-blue</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Blue ELEC Pump</label>
<halign>left</halign>
<property>/systems/failures/pump-blue</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Green HYD Leak</label>
<halign>left</halign>
<property>/systems/failures/hyd-green</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Green ENG 1 Pump</label>
<halign>left</halign>
<property>/systems/failures/pump-green</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Yellow HYD Leak</label>
<halign>left</halign>
<property>/systems/failures/hyd-yellow</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Yellow ENG 2 Pump</label>
<halign>left</halign>
<property>/systems/failures/pump-yellow-eng</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Yellow ELEC Pump</label>
<halign>left</halign>
<property>/systems/failures/pump-yellow-elec</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<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/>
<button>
<legend>Reset All</legend>
<halign>center</halign>
<padding>5</padding>
<pref-width>120</pref-width>
<binding>
<command>nasal</command>
<script>
@ -316,19 +436,7 @@
</script>
</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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 KiB

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<sim>
<model>
<livery>
<name>American Airlines (Allegheny heritage livery)</name>
<texture>Liveries/A319/CFM/N745VJ.png</texture>
</livery>
</model>
</sim>
<options>
<EIS2 type="bool">1</EIS2>
</options>
<sharklet type="bool">0</sharklet>
</PropertyList>

View file

@ -303,9 +303,9 @@
<name>Left spoiler 1</name>
<type>rotate</type>
<object-name>SpoilerL1</object-name>
<property>/sim/multiplay/generic/float[9]</property>
<property>/controls/flight/spoiler-l1</property>
<interpolation>
<entry><ind>0.5</ind><dep> 0</dep></entry>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
</interpolation>
<axis>
@ -321,7 +321,7 @@
<name>Left spoiler 2</name>
<type>rotate</type>
<object-name>SpoilerL2</object-name>
<property>/sim/multiplay/generic/float[9]</property>
<property>/controls/flight/spoiler-l2</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -339,7 +339,7 @@
<name>Left spoiler 3</name>
<type>rotate</type>
<object-name>SpoilerL3</object-name>
<property>/sim/multiplay/generic/float[9]</property>
<property>/controls/flight/spoiler-l3</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -357,7 +357,7 @@
<name>Left spoiler 4</name>
<type>rotate</type>
<object-name>SpoilerL4</object-name>
<property>/sim/multiplay/generic/float[9]</property>
<property>/controls/flight/spoiler-l4</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -375,7 +375,7 @@
<name>Left spoiler 5</name>
<type>rotate</type>
<object-name>SpoilerL5</object-name>
<property>/sim/multiplay/generic/float[9]</property>
<property>/controls/flight/spoiler-l5</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -393,9 +393,9 @@
<name>Right spoiler 1</name>
<type>rotate</type>
<object-name>SpoilerR1</object-name>
<property>/sim/multiplay/generic/float[10]</property>
<property>/controls/flight/spoiler-r1</property>
<interpolation>
<entry><ind>0.5</ind><dep> 0</dep></entry>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
</interpolation>
<axis>
@ -411,7 +411,7 @@
<name>Right spoiler 2</name>
<type>rotate</type>
<object-name>SpoilerR2</object-name>
<property>/sim/multiplay/generic/float[10]</property>
<property>/controls/flight/spoiler-r2</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -429,7 +429,7 @@
<name>Right spoiler 3</name>
<type>rotate</type>
<object-name>SpoilerR3</object-name>
<property>/sim/multiplay/generic/float[10]</property>
<property>/controls/flight/spoiler-r3</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -447,7 +447,7 @@
<name>Right spoiler 4</name>
<type>rotate</type>
<object-name>SpoilerR4</object-name>
<property>/sim/multiplay/generic/float[10]</property>
<property>/controls/flight/spoiler-r4</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -465,7 +465,7 @@
<name>Right spoiler 5</name>
<type>rotate</type>
<object-name>SpoilerR5</object-name>
<property>/sim/multiplay/generic/float[10]</property>
<property>/controls/flight/spoiler-r5</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>

View file

@ -303,9 +303,9 @@
<name>Left spoiler 1</name>
<type>rotate</type>
<object-name>SpoilerL1</object-name>
<property>/sim/multiplay/generic/float[9]</property>
<property>/controls/flight/spoiler-l1</property>
<interpolation>
<entry><ind>0.5</ind><dep> 0</dep></entry>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
</interpolation>
<axis>
@ -321,7 +321,7 @@
<name>Left spoiler 2</name>
<type>rotate</type>
<object-name>SpoilerL2</object-name>
<property>/sim/multiplay/generic/float[9]</property>
<property>/controls/flight/spoiler-l2</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -339,7 +339,7 @@
<name>Left spoiler 3</name>
<type>rotate</type>
<object-name>SpoilerL3</object-name>
<property>/sim/multiplay/generic/float[9]</property>
<property>/controls/flight/spoiler-l3</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -357,7 +357,7 @@
<name>Left spoiler 4</name>
<type>rotate</type>
<object-name>SpoilerL4</object-name>
<property>/sim/multiplay/generic/float[9]</property>
<property>/controls/flight/spoiler-l4</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -375,7 +375,7 @@
<name>Left spoiler 5</name>
<type>rotate</type>
<object-name>SpoilerL5</object-name>
<property>/sim/multiplay/generic/float[9]</property>
<property>/controls/flight/spoiler-l5</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -393,9 +393,9 @@
<name>Right spoiler 1</name>
<type>rotate</type>
<object-name>SpoilerR1</object-name>
<property>/sim/multiplay/generic/float[10]</property>
<property>/controls/flight/spoiler-r1</property>
<interpolation>
<entry><ind>0.5</ind><dep> 0</dep></entry>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
</interpolation>
<axis>
@ -411,7 +411,7 @@
<name>Right spoiler 2</name>
<type>rotate</type>
<object-name>SpoilerR2</object-name>
<property>/sim/multiplay/generic/float[10]</property>
<property>/controls/flight/spoiler-r2</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -429,7 +429,7 @@
<name>Right spoiler 3</name>
<type>rotate</type>
<object-name>SpoilerR3</object-name>
<property>/sim/multiplay/generic/float[10]</property>
<property>/controls/flight/spoiler-r3</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -447,7 +447,7 @@
<name>Right spoiler 4</name>
<type>rotate</type>
<object-name>SpoilerR4</object-name>
<property>/sim/multiplay/generic/float[10]</property>
<property>/controls/flight/spoiler-r4</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
@ -465,7 +465,7 @@
<name>Right spoiler 5</name>
<type>rotate</type>
<object-name>SpoilerR5</object-name>
<property>/sim/multiplay/generic/float[10]</property>
<property>/controls/flight/spoiler-r5</property>
<interpolation>
<entry><ind>0.0</ind><dep> 0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>

View file

@ -1,12 +1,99 @@
# 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 #
###################
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();

Binary file not shown.

Binary file not shown.

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

@ -50,10 +50,6 @@
<type>float</type>
<property>/engines/engine[1]/reverser-pos-norm</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/elevator-sum</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/elevator-left</property>
@ -62,10 +58,6 @@
<type>float</type>
<property>/controls/flight/elevator-right</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/aileron-sum</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/aileron-left</property>
@ -76,11 +68,43 @@
</signal>
<signal>
<type>float</type>
<property>/controls/flight/spoiler-left</property>
<property>/controls/flight/spoiler-l1</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/spoiler-right</property>
<property>/controls/flight/spoiler-l2</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/spoiler-l3</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/spoiler-l4</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/spoiler-l5</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/spoiler-r1</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/spoiler-r2</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/spoiler-r3</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/spoiler-r4</property>
</signal>
<signal>
<type>float</type>
<property>/controls/flight/spoiler-r5</property>
</signal>
<signal>
<type>float</type>

File diff suppressed because it is too large Load diff

View file

@ -115,7 +115,7 @@
<property>/controls/flight/aileron-fbw-cmd</property>
</output>
<config>
<Kp>0.06</Kp>
<Kp>0.11</Kp>
<beta>1</beta>
<alpha>0.1</alpha>
<gamma>0</gamma>
@ -159,7 +159,6 @@
</and>
</condition>
<property>/controls/flight/aileron-fbw-cmd</property>
<scale>2.0</scale>
</input>
<input>
<condition>
@ -208,7 +207,6 @@
<name>IT-FBW: AILERON</name>
<type>gain</type>
<gain>1</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>/controls/flight/roll-fbw</input>
<output>/controls/flight/aileron-fbw</output>
</filter>
@ -217,21 +215,85 @@
<name>IT-FBW: LEFT SPOILER</name>
<type>gain</type>
<gain>1</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>/controls/flight/roll-fbw</input>
<input>
<condition>
<equals>
<property>/systems/failures/aileron-left</property>
<value>0</value>
</equals>
</condition>
<expression>
<table>
<property>/controls/flight/roll-fbw</property>
<entry><ind>-1.0</ind><dep>-1.0</dep></entry>
<entry><ind>-0.2</ind><dep> 0.0</dep></entry>
<entry><ind> 0.0</ind><dep> 0.0</dep></entry>
<entry><ind> 0.2</ind><dep> 0.0</dep></entry>
<entry><ind> 1.0</ind><dep> 1.0</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<equals>
<property>/systems/failures/aileron-left</property>
<value>1</value>
</equals>
</condition>
<expression>
<table>
<property>/controls/flight/roll-fbw</property>
<entry><ind>-1.0</ind><dep>-1.0</dep></entry>
<entry><ind> 0.0</ind><dep> 0.0</dep></entry>
<entry><ind> 1.0</ind><dep> 1.0</dep></entry>
</table>
</expression>
</input>
<output>/controls/flight/spoiler-left-fbw-cmd</output>
<min>-1</min>
<max>0</max>
<max>1</max>
</filter>
<filter>
<name>IT-FBW: RIGHT SPOILER</name>
<type>gain</type>
<gain>1</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>/controls/flight/roll-fbw</input>
<input>
<condition>
<equals>
<property>/systems/failures/aileron-right</property>
<value>0</value>
</equals>
</condition>
<expression>
<table>
<property>/controls/flight/roll-fbw</property>
<entry><ind>-1.0</ind><dep>-1.0</dep></entry>
<entry><ind>-0.2</ind><dep> 0.0</dep></entry>
<entry><ind> 0.0</ind><dep> 0.0</dep></entry>
<entry><ind> 0.2</ind><dep> 0.0</dep></entry>
<entry><ind> 1.0</ind><dep> 1.0</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<equals>
<property>/systems/failures/aileron-right</property>
<value>1</value>
</equals>
</condition>
<expression>
<table>
<property>/controls/flight/roll-fbw</property>
<entry><ind>-1.0</ind><dep>-1.0</dep></entry>
<entry><ind> 0.0</ind><dep> 0.0</dep></entry>
<entry><ind> 1.0</ind><dep> 1.0</dep></entry>
</table>
</expression>
</input>
<output>/controls/flight/spoiler-right-fbw-cmd</output>
<min>0</min>
<min>-1</min>
<max>1</max>
</filter>
@ -288,11 +350,11 @@
<property>/controls/flight/elevator-fbw-cmd</property>
</output>
<config>
<Kp>-0.10</Kp>
<Kp>-0.22</Kp>
<beta>1</beta>
<alpha>0.1</alpha>
<gamma>0</gamma>
<Ti>5</Ti>
<Ti>10</Ti>
<Td>0.002</Td>
<u_min>-0.5</u_min>
<u_max>0.5</u_max>
@ -510,7 +572,6 @@
</and>
</condition>
<property>/controls/flight/elevator-fbw-cmd</property>
<scale>2.0</scale>
</input>
<input>
<condition>

View file

@ -37,19 +37,19 @@
<table>
<independentVar lookup="row">/controls/flight/aileron-input</independentVar>
<tableData>
-1.0 -0.150
-0.7 -0.100
-0.5 -0.050
-0.3 -0.025
-0.15 -0.010
-0.05 -0.005
0.00 0.000
0.05 0.005
0.15 0.010
0.3 0.025
0.5 0.050
0.7 0.100
1.0 0.150
-1.0 -0.1500
-0.7 -0.1000
-0.5 -0.0500
-0.3 -0.0270
-0.15 -0.0140
-0.05 -0.0055
0.00 0.0000
0.05 0.0055
0.15 0.0140
0.3 0.0270
0.5 0.0500
0.7 0.1000
1.0 0.1500
</tableData>
</table>
</sum>
@ -100,9 +100,9 @@
<table>
<independentVar lookup="row">/controls/flight/elevator-input</independentVar>
<tableData>
-1.0 0.0755
-0.7 0.0535
-0.5 0.0225
-1.0 0.075
-0.7 0.053
-0.5 0.022
-0.3 0.0115
-0.15 0.0045
-0.05 0.0007
@ -110,9 +110,9 @@
0.05 -0.0007
0.15 -0.0045
0.3 -0.0115
0.5 -0.0225
0.7 -0.0535
1.0 -0.0755
0.5 -0.022
0.7 -0.053
1.0 -0.075
</tableData>
</table>
</sum>