1
0
Fork 0

Merge branch 'dev' of github.com:legoboyvdlp/A320-family into dev

This commit is contained in:
Josh Davidson 2020-11-27 12:13:51 -05:00
commit 9c359e4d62
16 changed files with 574 additions and 231 deletions

View file

@ -278,6 +278,18 @@
<menubar> <menubar>
<default> <default>
<menu n="9">
<item n="2">
<key>?</key>
<label>Aircraft Help</label>
<binding>
<command>nasal</command>
<script>
acconfig.help_dlg.open();
</script>
</binding>
</item>
</menu>
<menu n="100"> <menu n="100">
<label>|</label> <label>|</label>
<enabled type="bool">false</enabled> <enabled type="bool">false</enabled>
@ -753,9 +765,6 @@
<overspeed-roll-back type="bool">0</overspeed-roll-back> <overspeed-roll-back type="bool">0</overspeed-roll-back>
</protections> </protections>
<spd-hld type="bool">0</spd-hld> <spd-hld type="bool">0</spd-hld>
<speeds>
<vmo-mmo type="int">350</vmo-mmo>
</speeds>
</it-fbw> </it-fbw>
<FMGC n="0"> <FMGC n="0">
@ -1287,6 +1296,7 @@
<fac2 type="bool">0</fac2> <fac2 type="bool">0</fac2>
<rtlu-1 type="bool">0</rtlu-1> <rtlu-1 type="bool">0</rtlu-1>
<rtlu-2 type="bool">0</rtlu-2> <rtlu-2 type="bool">0</rtlu-2>
<ths-jam type="bool">0</ths-jam>
<yaw-damper-1 type="bool">0</yaw-damper-1> <yaw-damper-1 type="bool">0</yaw-damper-1>
<yaw-damper-2 type="bool">0</yaw-damper-2> <yaw-damper-2 type="bool">0</yaw-damper-2>
</fctl> </fctl>
@ -1572,8 +1582,8 @@
<instrumentation n="0"> <instrumentation n="0">
<altimeter n="0"> <altimeter n="0">
<inhg type="bool">0</inhg> <inhg type="bool">0</inhg>
<indicated-altitude-ft tyep="double">0</indicated-altitude-ft> <indicated-altitude-ft type="double">0</indicated-altitude-ft>
<indicated-altitude-ft-pfd tyep="double">0</indicated-altitude-ft-pfd> <indicated-altitude-ft-pfd type="double">0</indicated-altitude-ft-pfd>
<oldqnh type="double">29.92</oldqnh> <oldqnh type="double">29.92</oldqnh>
<serviceable type="bool">true</serviceable> <serviceable type="bool">true</serviceable>
<std type="bool">0</std> <std type="bool">0</std>

View file

@ -144,6 +144,16 @@
<live>true</live> <live>true</live>
</checkbox> </checkbox>
<checkbox>
<label>THS</label>
<halign>left</halign>
<property>/systems/failures/fctl/ths-jam</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox> <checkbox>
<label>Yaw Damper 1</label> <label>Yaw Damper 1</label>
<halign>left</halign> <halign>left</halign>

View file

@ -367,10 +367,26 @@
<property>systems/hydraulic/brakes/pressure-left-psi</property> <property>systems/hydraulic/brakes/pressure-left-psi</property>
<factor>-0.03</factor> <factor>-0.03</factor>
<condition> <condition>
<or>
<equals>
<property>systems/hydraulic/brakes/mode</property>
<value>0</value>
</equals>
<and>
<equals>
<property>systems/hydraulic/brakes/mode</property>
<value>1</value>
</equals>
<equals>
<property>systems/hydraulic/brakes/pressure-left-psi</property>
<value>0</value>
</equals>
</and>
<equals> <equals>
<property>systems/hydraulic/brakes/mode</property> <property>systems/hydraulic/brakes/mode</property>
<value>2</value> <value>2</value>
</equals> </equals>
</or>
</condition> </condition>
<axis> <axis>
<object-name>brakes_lb_psi.axis</object-name> <object-name>brakes_lb_psi.axis</object-name>
@ -383,10 +399,26 @@
<property>systems/hydraulic/brakes/pressure-right-psi</property> <property>systems/hydraulic/brakes/pressure-right-psi</property>
<factor>0.03</factor> <factor>0.03</factor>
<condition> <condition>
<or>
<equals>
<property>systems/hydraulic/brakes/mode</property>
<value>0</value>
</equals>
<and>
<equals>
<property>systems/hydraulic/brakes/mode</property>
<value>1</value>
</equals>
<equals>
<property>systems/hydraulic/brakes/pressure-right-psi</property>
<value>0</value>
</equals>
</and>
<equals> <equals>
<property>systems/hydraulic/brakes/mode</property> <property>systems/hydraulic/brakes/mode</property>
<value>2</value> <value>2</value>
</equals> </equals>
</or>
</condition> </condition>
<axis> <axis>
<object-name>brakes_rb_psi.axis</object-name> <object-name>brakes_rb_psi.axis</object-name>
@ -399,16 +431,10 @@
<property>systems/hydraulic/brakes/accumulator-pressure-psi</property> <property>systems/hydraulic/brakes/accumulator-pressure-psi</property>
<interpolation> <interpolation>
<entry><ind>0</ind><dep>0</dep></entry> <entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>700</ind><dep>-66</dep></entry> <entry><ind>700</ind><dep>-20</dep></entry>
<entry><ind>2000</ind><dep>-78</dep></entry> <entry><ind>2000</ind><dep>-44</dep></entry>
<entry><ind>3000</ind><dep>-90</dep></entry> <entry><ind>3000</ind><dep>-66</dep></entry>
</interpolation> </interpolation>
<condition>
<equals>
<property>systems/hydraulic/brakes/mode</property>
<value>2</value>
</equals>
</condition>
<axis> <axis>
<object-name>brakes_accum_psi.axis</object-name> <object-name>brakes_accum_psi.axis</object-name>
</axis> </axis>

View file

@ -36,6 +36,15 @@ var tr2_v = 0;
var tr2_a = 0; var tr2_a = 0;
var essTramps = 0; var essTramps = 0;
var essTrvolts = 0; var essTrvolts = 0;
var elac1Node = 0;
var elac2Node = 0;
var sec1Node = 0;
var sec2Node = 0;
var eng_valve_state = 0;
var bleed_valve_cur = 0;
var hp_valve_state = 0;
var xbleedcmdstate = 0;
var ramAirState = 0;
# Conversion factor pounds to kilogram # Conversion factor pounds to kilogram
LBS2KGS = 0.4535924; LBS2KGS = 0.4535924;
@ -92,6 +101,8 @@ var precooler1_ovht = props.globals.getNode("/systems/pneumatics/precooler/ovht-
var precooler2_ovht = props.globals.getNode("/systems/pneumatics/precooler/ovht-2", 1); var precooler2_ovht = props.globals.getNode("/systems/pneumatics/precooler/ovht-2", 1);
var bmc1working = props.globals.getNode("/systems/pneumatics/indicating/bmc1-working", 1); var bmc1working = props.globals.getNode("/systems/pneumatics/indicating/bmc1-working", 1);
var bmc2working = props.globals.getNode("/systems/pneumatics/indicating/bmc2-working", 1); var bmc2working = props.globals.getNode("/systems/pneumatics/indicating/bmc2-working", 1);
var bmc1 = 0;
var bmc2 = 0;
var gs_kt = props.globals.getNode("/velocities/groundspeed-kt", 1); var gs_kt = props.globals.getNode("/velocities/groundspeed-kt", 1);
var switch_wing_aice = props.globals.getNode("/controls/ice-protection/wing", 1); var switch_wing_aice = props.globals.getNode("/controls/ice-protection/wing", 1);
var pack1_bypass = props.globals.getNode("/systems/pneumatics/pack-1-bypass", 1); var pack1_bypass = props.globals.getNode("/systems/pneumatics/pack-1-bypass", 1);
@ -650,14 +661,15 @@ var canvas_lowerECAM_bleed = {
update: func() { update: func() {
# X BLEED # X BLEED
xbleedstate = xbleed.getValue(); xbleedstate = xbleed.getValue();
if (xbleedcmd.getBoolValue() != xbleedstate) { xbleedcmdstate = xbleedcmd.getBoolValue();
if (xbleedcmdstate != xbleedstate) {
me["BLEED-XFEED"].setColor(0.7333,0.3803,0); me["BLEED-XFEED"].setColor(0.7333,0.3803,0);
} else { } else {
me["BLEED-XFEED"].setColor(0.0509,0.7529,0.2941); me["BLEED-XFEED"].setColor(0.0509,0.7529,0.2941);
} }
if (xbleedcmd.getBoolValue() == xbleedstate) { if (xbleedcmdstate == xbleedstate) {
if (xbleedcmd.getBoolValue()) { if (xbleedcmdstate) {
me["BLEED-XFEED"].setRotation(0); me["BLEED-XFEED"].setRotation(0);
} else { } else {
me["BLEED-XFEED"].setRotation(90 * D2R); me["BLEED-XFEED"].setRotation(90 * D2R);
@ -675,7 +687,7 @@ var canvas_lowerECAM_bleed = {
} }
# HP valve 1 # HP valve 1
var hp_valve_state = hp_valve1_state.getValue(); hp_valve_state = hp_valve1_state.getValue();
if (hp_valve_state == 1) { if (hp_valve_state == 1) {
me["BLEED-HP-Valve-1"].setRotation(90 * D2R); me["BLEED-HP-Valve-1"].setRotation(90 * D2R);
@ -692,7 +704,7 @@ var canvas_lowerECAM_bleed = {
} }
# HP valve 2 # HP valve 2
var hp_valve_state = hp_valve2_state.getValue(); hp_valve_state = hp_valve2_state.getValue();
if (hp_valve_state == 1) { if (hp_valve_state == 1) {
me["BLEED-HP-Valve-2"].setRotation(90 * D2R); me["BLEED-HP-Valve-2"].setRotation(90 * D2R);
@ -709,15 +721,16 @@ var canvas_lowerECAM_bleed = {
} }
# ENG BLEED valve 1 # ENG BLEED valve 1
var eng_valve_state = systems.PNEU.Switch.bleed1.getValue(); eng_valve_state = systems.PNEU.Switch.bleed1.getValue();
bleed_valve_cur = eng_valve1.getValue();
if (eng_valve1.getValue() == 0) { if (bleed_valve_cur == 0) {
me["BLEED-ENG-1"].setRotation(0); me["BLEED-ENG-1"].setRotation(0);
} else { } else {
me["BLEED-ENG-1"].setRotation(90 * D2R); me["BLEED-ENG-1"].setRotation(90 * D2R);
} }
if (eng_valve_state == eng_valve1.getValue()) { if (eng_valve_state == bleed_valve_cur) {
me["BLEED-ENG-1"].setColor(0.0509,0.7529,0.2941); me["BLEED-ENG-1"].setColor(0.0509,0.7529,0.2941);
} else { } else {
me["BLEED-ENG-1"].setColor(0.7333,0.3803,0); me["BLEED-ENG-1"].setColor(0.7333,0.3803,0);
@ -758,21 +771,25 @@ var canvas_lowerECAM_bleed = {
# ENG BLEED valve 2 # ENG BLEED valve 2
eng_valve_state = systems.PNEU.Switch.bleed2.getValue(); eng_valve_state = systems.PNEU.Switch.bleed2.getValue();
bleed_valve_cur = eng_valve2.getValue();
if (eng_valve2.getValue() == 0) { if (bleed_valve_cur == 0) {
me["BLEED-ENG-2"].setRotation(0); me["BLEED-ENG-2"].setRotation(0);
} else { } else {
me["BLEED-ENG-2"].setRotation(90 * D2R); me["BLEED-ENG-2"].setRotation(90 * D2R);
} }
if (eng_valve_state == eng_valve1.getValue()) { if (eng_valve_state == bleed_valve_cur) {
me["BLEED-ENG-2"].setColor(0.0509,0.7529,0.2941); me["BLEED-ENG-2"].setColor(0.0509,0.7529,0.2941);
} else { } else {
me["BLEED-ENG-2"].setColor(0.7333,0.3803,0); me["BLEED-ENG-2"].setColor(0.7333,0.3803,0);
} }
# Precooler inlet 1 # Precooler inlet 1
if (bmc1working.getValue()) { bmc1 = bmc1working.getValue();
bmc2 = bmc2working.getValue();
if (bmc1) {
var precooler_psi = precooler1_psi.getValue(); var precooler_psi = precooler1_psi.getValue();
me["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi))); me["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi)));
if (precooler_psi < 4 or precooler_psi > 57) { if (precooler_psi < 4 or precooler_psi > 57) {
@ -786,7 +803,7 @@ var canvas_lowerECAM_bleed = {
} }
# Precooler inlet 2 # Precooler inlet 2
if (bmc2working.getValue()) { if (bmc2) {
var precooler_psi = precooler2_psi.getValue(); var precooler_psi = precooler2_psi.getValue();
me["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi))); me["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi)));
if (precooler_psi < 4 or precooler_psi > 57) { if (precooler_psi < 4 or precooler_psi > 57) {
@ -800,7 +817,7 @@ var canvas_lowerECAM_bleed = {
} }
# Precooler outlet 1 # Precooler outlet 1
if (bmc1working.getValue()) { if (bmc1) {
var precooler_temp = precooler1_temp.getValue(); var precooler_temp = precooler1_temp.getValue();
me["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5))); me["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5)));
if (systems.PNEU.Switch.bleed1.getValue() and (precooler_temp < 150 or precooler1_ovht.getValue())) { if (systems.PNEU.Switch.bleed1.getValue() and (precooler_temp < 150 or precooler1_ovht.getValue())) {
@ -814,7 +831,7 @@ var canvas_lowerECAM_bleed = {
} }
# Precooler outlet 2 # Precooler outlet 2
if (bmc2working.getValue()) { if (bmc2) {
var precooler_temp = precooler2_temp.getValue(); var precooler_temp = precooler2_temp.getValue();
me["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5))); me["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5)));
if (systems.PNEU.Switch.bleed2.getValue() and (precooler_temp < 150 or precooler2_ovht.getValue())) { if (systems.PNEU.Switch.bleed2.getValue() and (precooler_temp < 150 or precooler2_ovht.getValue())) {
@ -858,6 +875,7 @@ var canvas_lowerECAM_bleed = {
} }
# PACK 1 ----------------------------------------- # PACK 1 -----------------------------------------
packValveState = systems.PNEU.Valves.pack1.getValue();
me["BLEED-Pack-1-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack1OutTemp.getValue(), 5))); me["BLEED-Pack-1-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack1OutTemp.getValue(), 5)));
me["BLEED-Pack-1-Comp-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack1OutletTemp.getValue(), 5))); me["BLEED-Pack-1-Comp-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack1OutletTemp.getValue(), 5)));
@ -867,9 +885,8 @@ var canvas_lowerECAM_bleed = {
me["BLEED-Pack-1-Out-Temp"].setColor(0.0509,0.7529,0.2941); me["BLEED-Pack-1-Out-Temp"].setColor(0.0509,0.7529,0.2941);
} }
var bypass_pos = pack1_bypass.getValue() - 50; # `-50` cause the middel position from where we move the needle is at 50 # `-50` cause the middel position from where we move the needle is at 50
bypass_pos = bypass_pos * D2R; me["BLEED-Pack-1-Bypass-needle"].setRotation((pack1_bypass.getValue() - 50) * D2R);
me["BLEED-Pack-1-Bypass-needle"].setRotation(bypass_pos);
if (systems.PNEU.Packs.pack1OutletTemp.getValue() > 230) { if (systems.PNEU.Packs.pack1OutletTemp.getValue() > 230) {
me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.7333,0.3803,0); me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
@ -877,29 +894,24 @@ var canvas_lowerECAM_bleed = {
me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941); me["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
} }
var flow_pos = systems.PNEU.Packs.packFlow1.getValue() * D2R; me["BLEED-Pack-1-Packflow-needle"].setRotation(systems.PNEU.Packs.packFlow1.getValue() * D2R);
me["BLEED-Pack-1-Packflow-needle"].setRotation(flow_pos);
if (systems.PNEU.Valves.pack1.getValue() == 0) { if (packValveState == 0) {
me["BLEED-Pack-1-Packflow-needle"].setColorFill(0.7333,0.3803,0); me["BLEED-Pack-1-Packflow-needle"].setColorFill(0.7333,0.3803,0);
me["BLEED-Pack-1-Flow-Valve"].setRotation(90 * D2R);
} else { } else {
me["BLEED-Pack-1-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941); me["BLEED-Pack-1-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
}
var pack_state = systems.PNEU.Valves.pack1.getValue();
if (pack_state == 1) {
me["BLEED-Pack-1-Flow-Valve"].setRotation(0); me["BLEED-Pack-1-Flow-Valve"].setRotation(0);
} else {
me["BLEED-Pack-1-Flow-Valve"].setRotation(90 * D2R);
} }
if (pack_state == systems.PNEU.Switch.pack1.getValue()) { if (packValveState == systems.PNEU.Switch.pack1.getValue()) {
me["BLEED-Pack-1-Flow-Valve"].setColor(0.0509,0.7529,0.2941); me["BLEED-Pack-1-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
} else { } else {
me["BLEED-Pack-1-Flow-Valve"].setColor(0.7333,0.3803,0); me["BLEED-Pack-1-Flow-Valve"].setColor(0.7333,0.3803,0);
} }
# PACK 2 ----------------------------------------- # PACK 2 -----------------------------------------
packValveState = systems.PNEU.Valves.pack2.getValue();
me["BLEED-Pack-2-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack2OutTemp.getValue(), 5))); me["BLEED-Pack-2-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack2OutTemp.getValue(), 5)));
me["BLEED-Pack-2-Comp-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack2OutletTemp.getValue(), 5))); me["BLEED-Pack-2-Comp-Out-Temp"].setText(sprintf("%s", math.round(systems.PNEU.Packs.pack2OutletTemp.getValue(), 5)));
@ -909,9 +921,7 @@ var canvas_lowerECAM_bleed = {
me["BLEED-Pack-2-Out-Temp"].setColor(0.0509,0.7529,0.2941); me["BLEED-Pack-2-Out-Temp"].setColor(0.0509,0.7529,0.2941);
} }
var bypass_pos = pack2_bypass.getValue() - 50; # `-50` cause the middel position from where we move the needle is at 50 me["BLEED-Pack-2-Bypass-needle"].setRotation((pack2_bypass.getValue() - 50) * D2R);
bypass_pos = bypass_pos * D2R;
me["BLEED-Pack-2-Bypass-needle"].setRotation(bypass_pos);
if (systems.PNEU.Packs.pack2OutletTemp.getValue() > 230) { if (systems.PNEU.Packs.pack2OutletTemp.getValue() > 230) {
me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.7333,0.3803,0); me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
@ -919,35 +929,30 @@ var canvas_lowerECAM_bleed = {
me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941); me["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
} }
flow_pos = systems.PNEU.Packs.packFlow2.getValue() * D2R; me["BLEED-Pack-2-Packflow-needle"].setRotation(systems.PNEU.Packs.packFlow2.getValue() * D2R);
me["BLEED-Pack-2-Packflow-needle"].setRotation(flow_pos);
if (systems.PNEU.Valves.pack2.getValue() == 0) { if (packValveState == 0) {
me["BLEED-Pack-2-Packflow-needle"].setColorFill(0.7333,0.3803,0); me["BLEED-Pack-2-Packflow-needle"].setColorFill(0.7333,0.3803,0);
me["BLEED-Pack-2-Flow-Valve"].setRotation(90 * D2R);
} else { } else {
me["BLEED-Pack-2-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941); me["BLEED-Pack-2-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
}
var pack_state = systems.PNEU.Valves.pack2.getValue();
if (pack_state == 1) {
me["BLEED-Pack-2-Flow-Valve"].setRotation(0); me["BLEED-Pack-2-Flow-Valve"].setRotation(0);
} else {
me["BLEED-Pack-2-Flow-Valve"].setRotation(90 * D2R);
} }
if (pack_state == systems.PNEU.Switch.pack2.getValue()) { if (packValveState == systems.PNEU.Switch.pack2.getValue()) {
me["BLEED-Pack-2-Flow-Valve"].setColor(0.0509,0.7529,0.2941); me["BLEED-Pack-2-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
} else { } else {
me["BLEED-Pack-2-Flow-Valve"].setColor(0.7333,0.3803,0); me["BLEED-Pack-2-Flow-Valve"].setColor(0.7333,0.3803,0);
} }
# Ram Air # Ram Air
if (systems.PNEU.Valves.ramAir.getValue() == 0) { ramAirState = systems.PNEU.Valves.ramAir.getValue();
if (ramAirState == 0) {
me["BLEED-Ram-Air"].setRotation(90 * D2R); me["BLEED-Ram-Air"].setRotation(90 * D2R);
me["BLEED-Ram-Air"].setColor(0.0509,0.7529,0.2941); me["BLEED-Ram-Air"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Ram-Air"].setColorFill(0.0509,0.7529,0.2941); me["BLEED-Ram-Air"].setColorFill(0.0509,0.7529,0.2941);
me["BLEED-Ram-Air-connection"].hide(); me["BLEED-Ram-Air-connection"].hide();
} elsif (systems.PNEU.Valves.ramAir.getValue()) { } elsif (ramAirState) {
me["BLEED-Ram-Air"].setRotation(0); me["BLEED-Ram-Air"].setRotation(0);
if (pts.Gear.wow[1].getValue()) { if (pts.Gear.wow[1].getValue()) {
me["BLEED-Ram-Air"].setColor(0.7333,0.3803,0); me["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
@ -966,7 +971,7 @@ var canvas_lowerECAM_bleed = {
# Triangles # Triangles
if (systems.PNEU.Valves.pack1.getValue() == 0 and systems.PNEU.Valves.pack2.getValue() == 0) { if (systems.PNEU.Valves.pack1.getValue() == 0 and systems.PNEU.Valves.pack2.getValue() == 0) {
if (pts.Gear.wow[1].getValue() or systems.PNEU.Valves.ramAir.getValue() != 1) { if (pts.Gear.wow[1].getValue() or ramAirState != 1) {
me["BLEED-cond-1"].setColor(0.7333,0.3803,0); me["BLEED-cond-1"].setColor(0.7333,0.3803,0);
me["BLEED-cond-2"].setColor(0.7333,0.3803,0); me["BLEED-cond-2"].setColor(0.7333,0.3803,0);
me["BLEED-cond-3"].setColor(0.7333,0.3803,0); me["BLEED-cond-3"].setColor(0.7333,0.3803,0);
@ -1951,12 +1956,16 @@ var canvas_lowerECAM_fctl = {
return["TAT","SAT","GW","UTCh","UTCm","GW-weight-unit","ailL","ailR","elevL","elevR","PTcc","PT","PTupdn","elac1","elac2","sec1","sec2","sec3","ailLblue","ailRblue","elevLblue","elevRblue","rudderblue","ailLgreen","ailRgreen","elevLgreen","ruddergreen","PTgreen", return["TAT","SAT","GW","UTCh","UTCm","GW-weight-unit","ailL","ailR","elevL","elevR","PTcc","PT","PTupdn","elac1","elac2","sec1","sec2","sec3","ailLblue","ailRblue","elevLblue","elevRblue","rudderblue","ailLgreen","ailRgreen","elevLgreen","ruddergreen","PTgreen",
"elevRyellow","rudderyellow","PTyellow","rudder","spdbrkblue","spdbrkgreen","spdbrkyellow","spoiler1Rex","spoiler1Rrt","spoiler2Rex","spoiler2Rrt","spoiler3Rex","spoiler3Rrt","spoiler4Rex","spoiler4Rrt","spoiler5Rex","spoiler5Rrt","spoiler1Lex", "elevRyellow","rudderyellow","PTyellow","rudder","spdbrkblue","spdbrkgreen","spdbrkyellow","spoiler1Rex","spoiler1Rrt","spoiler2Rex","spoiler2Rrt","spoiler3Rex","spoiler3Rrt","spoiler4Rex","spoiler4Rrt","spoiler5Rex","spoiler5Rrt","spoiler1Lex",
"spoiler1Lrt","spoiler2Lex","spoiler2Lrt","spoiler3Lex","spoiler3Lrt","spoiler4Lex","spoiler4Lrt","spoiler5Lex","spoiler5Lrt","spoiler1Rf","spoiler2Rf","spoiler3Rf","spoiler4Rf","spoiler5Rf","spoiler1Lf","spoiler2Lf","spoiler3Lf","spoiler4Lf", "spoiler1Lrt","spoiler2Lex","spoiler2Lrt","spoiler3Lex","spoiler3Lrt","spoiler4Lex","spoiler4Lrt","spoiler5Lex","spoiler5Lrt","spoiler1Rf","spoiler2Rf","spoiler3Rf","spoiler4Rf","spoiler5Rf","spoiler1Lf","spoiler2Lf","spoiler3Lf","spoiler4Lf",
"spoiler5Lf","ailLscale","ailRscale","path4249","path4249-3","path4249-3-6-7","path4249-3-6-7-5","path4249-3-6"]; "spoiler5Lf","ailLscale","ailRscale","path4249","path4249-3","path4249-3-6-7","path4249-3-6-7-5","path4249-3-6","text4343"];
}, },
update: func() { update: func() {
blue_psi = systems.HYD.Psi.blue.getValue(); blue_psi = systems.HYD.Psi.blue.getValue();
green_psi = systems.HYD.Psi.green.getValue(); green_psi = systems.HYD.Psi.green.getValue();
yellow_psi = systems.HYD.Psi.yellow.getValue(); yellow_psi = systems.HYD.Psi.yellow.getValue();
elac1Node = fbw.FBW.Computers.elac1.getValue();
elac2Node = fbw.FBW.Computers.elac2.getValue();
sec1Node = fbw.FBW.Computers.sec1.getValue();
sec2Node = fbw.FBW.Computers.sec2.getValue();
# Pitch Trim # Pitch Trim
me["PT"].setText(sprintf("%2.1f", math.round(elevator_trim_deg.getValue(), 0.1))); me["PT"].setText(sprintf("%2.1f", math.round(elevator_trim_deg.getValue(), 0.1)));
@ -1977,15 +1986,25 @@ var canvas_lowerECAM_fctl = {
me["PTcc"].setColor(0.0509,0.7529,0.2941); me["PTcc"].setColor(0.0509,0.7529,0.2941);
} }
if (fbw.FBW.Failures.ths.getBoolValue()) {
me["text4343"].setColor(0.7333,0.3803,0);
} else {
me["text4343"].setColor(0.8078,0.8039,0.8078);
}
# Ailerons # Ailerons
me["ailL"].setTranslation(0, aileron_ind_left.getValue() * 100); me["ailL"].setTranslation(0, aileron_ind_left.getValue() * 100);
me["ailR"].setTranslation(0, aileron_ind_right.getValue() * (-100)); me["ailR"].setTranslation(0, aileron_ind_right.getValue() * (-100));
if (blue_psi < 1500 and green_psi < 1500) { if ((blue_psi < 1500 or !elac1Node) and (green_psi < 1500 or !elac2Node)) {
me["ailL"].setColor(0.7333,0.3803,0); me["ailL"].setColor(0.7333,0.3803,0);
me["ailR"].setColor(0.7333,0.3803,0);
} else { } else {
me["ailL"].setColor(0.0509,0.7529,0.2941); me["ailL"].setColor(0.0509,0.7529,0.2941);
}
if ((green_psi < 1500 or !elac1Node) and (blue_psi < 1500 or !elac2Node)) {
me["ailR"].setColor(0.7333,0.3803,0);
} else {
me["ailR"].setColor(0.0509,0.7529,0.2941); me["ailR"].setColor(0.0509,0.7529,0.2941);
} }
@ -1993,13 +2012,13 @@ var canvas_lowerECAM_fctl = {
me["elevL"].setTranslation(0, elevator_ind_left.getValue() * 100); me["elevL"].setTranslation(0, elevator_ind_left.getValue() * 100);
me["elevR"].setTranslation(0, elevator_ind_right.getValue() * 100); me["elevR"].setTranslation(0, elevator_ind_right.getValue() * 100);
if (blue_psi < 1500 and green_psi < 1500) { if ((blue_psi < 1500 or (!elac1Node and !sec1Node)) and (green_psi < 1500 or (!elac2Node and !sec2Node))) {
me["elevL"].setColor(0.7333,0.3803,0); me["elevL"].setColor(0.7333,0.3803,0);
} else { } else {
me["elevL"].setColor(0.0509,0.7529,0.2941); me["elevL"].setColor(0.0509,0.7529,0.2941);
} }
if (blue_psi < 1500 and yellow_psi < 1500) { if ((blue_psi < 1500 or (!elac1Node and !sec1Node)) and (yellow_psi < 1500 or (!elac2Node and !sec2Node))) {
me["elevR"].setColor(0.7333,0.3803,0); me["elevR"].setColor(0.7333,0.3803,0);
} else { } else {
me["elevR"].setColor(0.0509,0.7529,0.2941); me["elevR"].setColor(0.0509,0.7529,0.2941);
@ -2237,34 +2256,34 @@ var canvas_lowerECAM_fctl = {
} }
# Flight Computers # Flight Computers
if (fbw.FBW.Computers.elac1.getValue()) { if (elac1Node) {
me["elac1"].setColor(0.0509,0.7529,0.2941); me["elac1"].setColor(0.0509,0.7529,0.2941);
me["path4249"].setColor(0.0509,0.7529,0.2941); me["path4249"].setColor(0.0509,0.7529,0.2941);
} else if (!fbw.FBW.Computers.elac1.getValue() or fbw.FBW.Failures.elac1.getValue()) { } else if (!elac1Node or fbw.FBW.Failures.elac1.getValue()) {
me["elac1"].setColor(0.7333,0.3803,0); me["elac1"].setColor(0.7333,0.3803,0);
me["path4249"].setColor(0.7333,0.3803,0); me["path4249"].setColor(0.7333,0.3803,0);
} }
if (fbw.FBW.Computers.elac2.getValue()) { if (elac2Node) {
me["elac2"].setColor(0.0509,0.7529,0.2941); me["elac2"].setColor(0.0509,0.7529,0.2941);
me["path4249-3"].setColor(0.0509,0.7529,0.2941); me["path4249-3"].setColor(0.0509,0.7529,0.2941);
} else if (!fbw.FBW.Computers.elac2.getValue() or fbw.FBW.Failures.elac2.getValue()) { } else if (!elac2Node or fbw.FBW.Failures.elac2.getValue()) {
me["elac2"].setColor(0.7333,0.3803,0); me["elac2"].setColor(0.7333,0.3803,0);
me["path4249-3"].setColor(0.7333,0.3803,0); me["path4249-3"].setColor(0.7333,0.3803,0);
} }
if (fbw.FBW.Computers.sec1.getValue()) { if (sec1Node) {
me["sec1"].setColor(0.0509,0.7529,0.2941); me["sec1"].setColor(0.0509,0.7529,0.2941);
me["path4249-3-6-7"].setColor(0.0509,0.7529,0.2941); me["path4249-3-6-7"].setColor(0.0509,0.7529,0.2941);
} else if (!fbw.FBW.Computers.sec1.getValue() or fbw.FBW.Failures.sec1.getValue()) { } else if (!sec1Node or fbw.FBW.Failures.sec1.getValue()) {
me["sec1"].setColor(0.7333,0.3803,0); me["sec1"].setColor(0.7333,0.3803,0);
me["path4249-3-6-7"].setColor(0.7333,0.3803,0); me["path4249-3-6-7"].setColor(0.7333,0.3803,0);
} }
if (fbw.FBW.Computers.sec2.getValue()) { if (sec2Node) {
me["sec2"].setColor(0.0509,0.7529,0.2941); me["sec2"].setColor(0.0509,0.7529,0.2941);
me["path4249-3-6-7-5"].setColor(0.0509,0.7529,0.2941); me["path4249-3-6-7-5"].setColor(0.0509,0.7529,0.2941);
} else if (!fbw.FBW.Computers.sec2.getValue() or fbw.FBW.Failures.sec2.getValue()) { } else if (!sec2Node or fbw.FBW.Failures.sec2.getValue()) {
me["sec2"].setColor(0.7333,0.3803,0); me["sec2"].setColor(0.7333,0.3803,0);
me["path4249-3-6-7-5"].setColor(0.7333,0.3803,0); me["path4249-3-6-7-5"].setColor(0.7333,0.3803,0);
} }
@ -2279,10 +2298,23 @@ var canvas_lowerECAM_fctl = {
# Hydraulic Indicators # Hydraulic Indicators
if (blue_psi >= 1500) { if (blue_psi >= 1500) {
if (elac1Node) {
me["ailLblue"].setColor(0.0509,0.7529,0.2941); me["ailLblue"].setColor(0.0509,0.7529,0.2941);
me["ailRblue"].setColor(0.0509,0.7529,0.2941); } else {
me["ailLblue"].setColor(0.7333,0.3803,0);
}
if (elac1Node or sec1Node) {
me["elevLblue"].setColor(0.0509,0.7529,0.2941); me["elevLblue"].setColor(0.0509,0.7529,0.2941);
me["elevRblue"].setColor(0.0509,0.7529,0.2941); me["elevRblue"].setColor(0.0509,0.7529,0.2941);
} else {
me["elevLblue"].setColor(0.7333,0.3803,0);
me["elevRblue"].setColor(0.7333,0.3803,0);
}
if (elac2Node) {
me["ailRblue"].setColor(0.0509,0.7529,0.2941);
} else {
me["ailRblue"].setColor(0.7333,0.3803,0);
}
me["rudderblue"].setColor(0.0509,0.7529,0.2941); me["rudderblue"].setColor(0.0509,0.7529,0.2941);
me["spdbrkblue"].setColor(0.0509,0.7529,0.2941); me["spdbrkblue"].setColor(0.0509,0.7529,0.2941);
} else { } else {
@ -2295,9 +2327,22 @@ var canvas_lowerECAM_fctl = {
} }
if (green_psi >= 1500) { if (green_psi >= 1500) {
me["ailLgreen"].setColor(0.0509,0.7529,0.2941); if (elac2Node or sec2Node) {
me["ailRgreen"].setColor(0.0509,0.7529,0.2941);
me["elevLgreen"].setColor(0.0509,0.7529,0.2941); me["elevLgreen"].setColor(0.0509,0.7529,0.2941);
} else {
me["elevLgreen"].setColor(0.7333,0.3803,0);
}
if (elac2Node) {
me["ailLgreen"].setColor(0.0509,0.7529,0.2941);
} else {
me["ailLgreen"].setColor(0.7333,0.3803,0);
}
if (elac1Node) {
me["ailRgreen"].setColor(0.0509,0.7529,0.2941);
} else {
me["ailRgreen"].setColor(0.7333,0.3803,0);
}
me["ruddergreen"].setColor(0.0509,0.7529,0.2941); me["ruddergreen"].setColor(0.0509,0.7529,0.2941);
me["PTgreen"].setColor(0.0509,0.7529,0.2941); me["PTgreen"].setColor(0.0509,0.7529,0.2941);
me["spdbrkgreen"].setColor(0.0509,0.7529,0.2941); me["spdbrkgreen"].setColor(0.0509,0.7529,0.2941);
@ -2311,7 +2356,11 @@ var canvas_lowerECAM_fctl = {
} }
if (yellow_psi >= 1500) { if (yellow_psi >= 1500) {
if (elac2Node or sec2Node) {
me["elevRyellow"].setColor(0.0509,0.7529,0.2941); me["elevRyellow"].setColor(0.0509,0.7529,0.2941);
} else {
me["elevRyellow"].setColor(0.7333,0.3803,0);
}
me["rudderyellow"].setColor(0.0509,0.7529,0.2941); me["rudderyellow"].setColor(0.0509,0.7529,0.2941);
me["PTyellow"].setColor(0.0509,0.7529,0.2941); me["PTyellow"].setColor(0.0509,0.7529,0.2941);
me["spdbrkyellow"].setColor(0.0509,0.7529,0.2941); me["spdbrkyellow"].setColor(0.0509,0.7529,0.2941);

View file

@ -512,8 +512,8 @@ var canvas_PFD_base = {
me["FMA_rollarm_box"].hide(); me["FMA_rollarm_box"].hide();
me["FMA_Middle1"].hide(); me["FMA_Middle1"].hide();
me["FMA_Middle2"].hide(); me["FMA_Middle2"].hide();
if (wow1.getValue() == 0) {
if (fbw_curlaw == 2) { if (ecam.directLaw.active) {
me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM"); me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM");
me["FMA_ctr_msg"].setColor(0.7333,0.3803,0); me["FMA_ctr_msg"].setColor(0.7333,0.3803,0);
me["FMA_ctr_msg"].show(); me["FMA_ctr_msg"].show();
@ -524,9 +524,7 @@ var canvas_PFD_base = {
} else { } else {
me["FMA_ctr_msg"].hide(); me["FMA_ctr_msg"].hide();
} }
} else {
me["FMA_ctr_msg"].hide();
}
me["FMA_combined"].show(); me["FMA_combined"].show();
if (pitch_box.getValue() == 1 and pitch_mode_act != " ") { if (pitch_box.getValue() == 1 and pitch_mode_act != " ") {
me["FMA_combined_box"].show(); me["FMA_combined_box"].show();
@ -536,8 +534,7 @@ var canvas_PFD_base = {
} else { } else {
me["FMA_combined"].hide(); me["FMA_combined"].hide();
me["FMA_combined_box"].hide(); me["FMA_combined_box"].hide();
if (wow1.getValue() == 0) { if (ecam.directLaw.active) {
if (fbw_curlaw == 2) {
me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM"); me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM");
me["FMA_ctr_msg"].setColor(0.7333,0.3803,0); me["FMA_ctr_msg"].setColor(0.7333,0.3803,0);
me["FMA_Middle1"].hide(); me["FMA_Middle1"].hide();
@ -554,11 +551,6 @@ var canvas_PFD_base = {
me["FMA_Middle1"].show(); me["FMA_Middle1"].show();
me["FMA_Middle2"].hide(); me["FMA_Middle2"].hide();
} }
} else {
me["FMA_ctr_msg"].hide();
me["FMA_Middle1"].show();
me["FMA_Middle2"].hide();
}
if (ap1.getValue() == 1 or ap2.getValue() == 1 or fd1.getValue() == 1 or fd2.getValue() == 1) { if (ap1.getValue() == 1 or ap2.getValue() == 1 or fd1.getValue() == 1 or fd2.getValue() == 1) {
me["FMA_pitch"].show(); me["FMA_pitch"].show();
@ -1278,7 +1270,6 @@ var canvas_PFD_1 = {
} }
me["ASI_scale"].setTranslation(0, me.ASI * 6.6); me["ASI_scale"].setTranslation(0, me.ASI * 6.6);
if (fbw.FBW.Computers.fac1.getValue() or fbw.FBW.Computers.fac2.getValue()) { if (fbw.FBW.Computers.fac1.getValue() or fbw.FBW.Computers.fac2.getValue()) {
me["ASI_max"].setTranslation(0, me.ASImax * -6.6); me["ASI_max"].setTranslation(0, me.ASImax * -6.6);
me["ASI_max"].show(); me["ASI_max"].show();

View file

@ -74,6 +74,8 @@ var warningNodes = {
blueYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-fuel-consumpt"), blueYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-fuel-consumpt"),
greenYellow: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-failure"), greenYellow: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-failure"),
greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"), greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"),
leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"),
rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"),
}, },
Timers: { Timers: {
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"), apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
@ -94,6 +96,8 @@ var warningNodes = {
eng1AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-1-closed-output"), eng1AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-1-closed-output"),
eng2AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-closed-output"), eng2AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-closed-output"),
LRElevFault: props.globals.initNode("/ECAM/warnings/fctl/lrElevFault-output"), LRElevFault: props.globals.initNode("/ECAM/warnings/fctl/lrElevFault-output"),
altnLaw: props.globals.initNode("/ECAM/warnings/fctl/altn-law-output"),
directLaw: props.globals.initNode("/ECAM/warnings/fctl/direct-law-output"),
waiLhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-left"), waiLhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-left"),
waiRhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-right"), waiRhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-right"),
pack1Fault: props.globals.initNode("/ECAM/warnings/timer/pack-1-fault-2"), pack1Fault: props.globals.initNode("/ECAM/warnings/timer/pack-1-fault-2"),
@ -104,6 +108,8 @@ var warningNodes = {
yawDamper1Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-1-fault"), yawDamper1Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-1-fault"),
yawDamper2Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-2-fault"), yawDamper2Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-2-fault"),
navTerrFault: props.globals.initNode("/ECAM/warnings/timer/nav-gpws-terr-fault"), navTerrFault: props.globals.initNode("/ECAM/warnings/timer/nav-gpws-terr-fault"),
leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault-output"),
rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault-output"),
}, },
Flipflops: { Flipflops: {
apuGenFault: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault"), apuGenFault: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault"),

View file

@ -875,23 +875,6 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(emerconfigVent); ECAM_controller.warningReset(emerconfigVent);
} }
if (emerconfigAltn.clearFlag == 0) {
emerconfigAltn.active = 1;
} else {
ECAM_controller.warningReset(emerconfigAltn);
}
if (emerconfigProt.clearFlag == 0) {
emerconfigProt.active = 1;
} else {
ECAM_controller.warningReset(emerconfigProt);
}
if (emerconfigMaxSpeed.clearFlag == 0) {
emerconfigMaxSpeed.active = 1;
} else {
ECAM_controller.warningReset(emerconfigMaxSpeed);
}
} else { } else {
ECAM_controller.warningReset(emerconfig); ECAM_controller.warningReset(emerconfig);
ECAM_controller.warningReset(emerconfigMinRat); ECAM_controller.warningReset(emerconfigMinRat);
@ -909,9 +892,6 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(emerconfigBusTie2); ECAM_controller.warningReset(emerconfigBusTie2);
ECAM_controller.warningReset(emerconfigAPU); ECAM_controller.warningReset(emerconfigAPU);
ECAM_controller.warningReset(emerconfigVent); ECAM_controller.warningReset(emerconfigVent);
ECAM_controller.warningReset(emerconfigAltn);
ECAM_controller.warningReset(emerconfigProt);
ECAM_controller.warningReset(emerconfigMaxSpeed);
} }
if (hydBYloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.blueYellow.getValue()) { if (hydBYloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.blueYellow.getValue()) {
@ -1290,6 +1270,109 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(apuGenfaultGen3); ECAM_controller.warningReset(apuGenfaultGen3);
} }
if (lElevFault.clearFlag == 0 and warningNodes.Timers.leftElevFail.getValue() and phaseVar2 != 4 and phaseVar2 != 5) {
lElevFault.active = 1;
if (lElevFaultCare.clearFlag == 0) {
lElevFaultCare.active = 1;
} else {
ECAM_controller.warningReset(lElevFaultCare);
}
if (lElevFaultPitch.clearFlag == 0) {
lElevFaultPitch.active = 1;
} else {
ECAM_controller.warningReset(lElevFaultPitch);
}
} else {
ECAM_controller.warningReset(lElevFault);
ECAM_controller.warningReset(lElevFaultCare);
ECAM_controller.warningReset(lElevFaultPitch);
}
if (rElevFault.clearFlag == 0 and warningNodes.Timers.rightElevFail.getValue() and phaseVar2 != 4 and phaseVar2 != 5) {
rElevFault.active = 1;
if (rElevFaultCare.clearFlag == 0) {
rElevFaultCare.active = 1;
} else {
ECAM_controller.warningReset(rElevFaultCare);
}
if (rElevFaultPitch.clearFlag == 0) {
rElevFaultPitch.active = 1;
} else {
ECAM_controller.warningReset(rElevFaultPitch);
}
} else {
ECAM_controller.warningReset(rElevFault);
ECAM_controller.warningReset(rElevFaultCare);
ECAM_controller.warningReset(rElevFaultPitch);
}
if (directLaw.clearFlag == 0 and warningNodes.Timers.directLaw.getValue() and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) {
directLaw.active = 1;
directLawProt.active = 1;
if (directLawMaxSpeed.clearFlag == 0 and !fbw.tripleADRFail and pts.Gear.position[1].getValue() == 1) {
directLawMaxSpeed.active = 1;
} else {
ECAM_controller.warningReset(directLawMaxSpeed);
}
if (directLawTrim.clearFlag == 0 and (systems.HYD.Psi.green.getValue() >= 1500 or systems.HYD.Psi.yellow.getValue() >= 1500) and !fbw.FBW.Failures.ths.getValue()) {
directLawTrim.active = 1;
} else {
ECAM_controller.warningReset(directLawTrim);
}
if (directLawCare.clearFlag == 0 and (fbw.tripleADRFail or pts.Gear.position[1].getValue() == 1)) {
directLawCare.active = 1;
} else {
ECAM_controller.warningReset(directLawCare);
}
if (directLawSpdBrk.clearFlag == 0 and !fbw.tripleADRFail and pts.Gear.position[1].getValue() == 1) {
directLawSpdBrk.active = 1;
} else {
ECAM_controller.warningReset(directLawSpdBrk);
}
if (directLawSpdBrk2.clearFlag == 0 and fbw.tripleADRFail) {
directLawSpdBrk2.active = 1;
} else {
ECAM_controller.warningReset(directLawSpdBrk2);
}
} else {
ECAM_controller.warningReset(directLaw);
ECAM_controller.warningReset(directLawProt);
ECAM_controller.warningReset(directLawMaxSpeed);
ECAM_controller.warningReset(directLawTrim);
ECAM_controller.warningReset(directLawCare);
ECAM_controller.warningReset(directLawSpdBrk);
ECAM_controller.warningReset(directLawSpdBrk2);
}
if (altnLaw.clearFlag == 0 and warningNodes.Timers.altnLaw.getValue() and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) {
altnLaw.active = 1;
altnLawProt.active = 1;
if (altnLawMaxSpeed.clearFlag == 0 and altnLawMaxSpeed2.clearFlag == 0 and !fbw.tripleADRFail) {
if (!(getprop("/ECAM/warnings/hyd/green-abnorm-lo-pr") and (getprop("/ECAM/warnings/hyd/blue-abnorm-lo-pr") or getprop("/ECAM/warnings/hyd/yellow-abnorm-lo-pr")))) {
altnLawMaxSpeed.active = 1;
ECAM_controller.warningReset(altnLawMaxSpeed2);
} else {
altnLawMaxSpeed2.active = 1;
ECAM_controller.warningReset(altnLawMaxSpeed);
}
} else {
ECAM_controller.warningReset(altnLawMaxSpeed);
ECAM_controller.warningReset(altnLawMaxSpeed2);
}
if (altnLawMaxSpdBrk.clearFlag == 0 and (fbw.tripleADRFail or warningNodes.Logic.leftElevFail.getValue() or warningNodes.Logic.rightElevFail.getValue())) {
altnLawMaxSpdBrk.active = 1;
} else {
ECAM_controller.warningReset(altnLawMaxSpdBrk);
}
} else {
ECAM_controller.warningReset(altnLaw);
ECAM_controller.warningReset(altnLawProt);
ECAM_controller.warningReset(altnLawMaxSpeed);
ECAM_controller.warningReset(altnLawMaxSpeed2);
ECAM_controller.warningReset(altnLawMaxSpdBrk);
}
if ((athr_offw.clearFlag == 0) and athrWarn.getValue() == 2 and phaseVar2 != 4 and phaseVar2 != 8 and phaseVar2 != 10) { if ((athr_offw.clearFlag == 0) and athrWarn.getValue() == 2 and phaseVar2 != 4 and phaseVar2 != 8 and phaseVar2 != 10) {
athr_offw.active = 1; athr_offw.active = 1;
athr_offw_1.active = 1; athr_offw_1.active = 1;

View file

@ -155,9 +155,6 @@ var warnings = std.Vector.new([
var emerconfigBusTie2 = warning.new(msg: " -BUS TIE...........AUTO", colour: "c"), var emerconfigBusTie2 = warning.new(msg: " -BUS TIE...........AUTO", colour: "c"),
var emerconfigAPU = warning.new(msg: " -APU (IF AVAIL)...START", colour: "c"), var emerconfigAPU = warning.new(msg: " -APU (IF AVAIL)...START", colour: "c"),
var emerconfigVent = warning.new(msg: " -BLOWER + EXTRACT..OVRD", colour: "c"), var emerconfigVent = warning.new(msg: " -BLOWER + EXTRACT..OVRD", colour: "c"),
var emerconfigAltn = warning.new(msg: "F/CTL ALTN LAW", colour: "a"),
var emerconfigProt = warning.new(msg: " (PROT LOST)", colour: "a"),
var emerconfigMaxSpeed = warning.new(msg: " MAX SPEED........320 KT", colour: "c"),
# B + Y LO PR # B + Y LO PR
var hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1), var hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
@ -265,6 +262,32 @@ var warnings = std.Vector.new([
var apuGenfaultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"), var apuGenfaultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
var apuGenfaultGen3 = warning.new(msg: "-APU GEN............OFF", colour: "c"), var apuGenfaultGen3 = warning.new(msg: "-APU GEN............OFF", colour: "c"),
# L ELEV FAULT
var lElevFault = warning.new(msg: "F/CTL L ELEV FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var lElevFaultCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"),
var lElevFaultPitch = warning.new(msg: " FOR GA:MAX PITCH 15 DEG", colour: "c"),
# R ELEV FAULT
var rElevFault = warning.new(msg: "F/CTL R ELEV FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var rElevFaultCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"),
var rElevFaultPitch = warning.new(msg: " FOR GA:MAX PITCH 15 DEG", colour: "c"),
# DIRECT LAW
var directLaw = warning.new(msg: "F/CTL DIRECT LAW", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var directLawProt = warning.new(msg: " (PROT LOST)", colour: "a"),
var directLawMaxSpeed = warning.new(msg: " MAX SPEED........320/.77", colour: "c"),
var directLawTrim = warning.new(msg: " -MAN PITCH TRIM.....USE", colour: "c"),
var directLawCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"),
var directLawSpdBrk = warning.new(msg: " USE SPD BRK WITH CARE", colour: "c"),
var directLawSpdBrk2 = warning.new(msg: " SPD BRK.......DO NOT USE", colour: "c"),
# ALTN LAW
var altnLaw = warning.new(msg: "F/CTL ALTN LAW", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var altnLawProt = warning.new(msg: " (PROT LOST)", colour: "a"),
var altnLawMaxSpeed = warning.new(msg: " MAX SPEED........320 KT", colour: "c"),
var altnLawMaxSpeed2 = warning.new(msg: " MAX SPEED........320/.77", colour: "c"),
var altnLawMaxSpdBrk = warning.new(msg: " SPD BRK.......DO NOT USE", colour: "c"),
# Autothrust # Autothrust
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1), var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"), var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),

View file

@ -72,6 +72,9 @@ var FWC = {
altChg: props.globals.getNode("/it-autoflight/input/alt-is-changing", 1), altChg: props.globals.getNode("/it-autoflight/input/alt-is-changing", 1),
}; };
var gnd = nil;
var gndTimer = nil;
var phaseLoop = func() { var phaseLoop = func() {
if ((systems.ELEC.Bus.acEss.getValue() < 110 and systems.ELEC.Bus.ac2.getValue() < 110) or pts.Acconfig.running.getBoolValue()) { return; } if ((systems.ELEC.Bus.acEss.getValue() < 110 and systems.ELEC.Bus.ac2.getValue() < 110) or pts.Acconfig.running.getBoolValue()) { return; }
if (pts.Sim.Replay.replayActive.getBoolValue()) { return; } if (pts.Sim.Replay.replayActive.getBoolValue()) { return; }
@ -84,7 +87,8 @@ var phaseLoop = func() {
eng2n1 = pts.Engines.Engine.n1Actual[1].getValue(); eng2n1 = pts.Engines.Engine.n1Actual[1].getValue();
master1 = pts.Controls.Engines.Engine.cutoffSw[0].getBoolValue(); master1 = pts.Controls.Engines.Engine.cutoffSw[0].getBoolValue();
master2 = pts.Controls.Engines.Engine.cutoffSw[1].getBoolValue(); master2 = pts.Controls.Engines.Engine.cutoffSw[1].getBoolValue();
gnd = FWC.Logic.gnd.getBoolValue();
gndTimer = FWC.Timer.gnd.getValue();
FWC.Flipflop.recallReset.setValue(0); FWC.Flipflop.recallReset.setValue(0);
# Various things # Various things
@ -102,13 +106,13 @@ var phaseLoop = func() {
FWC.Flipflop.phase10Set.setBoolValue(0); FWC.Flipflop.phase10Set.setBoolValue(0);
} }
if (FWC.Timer.gnd.getValue() == 1 and pts.Controls.Engines.Engine.firePb[0].getBoolValue()) { if (gndTimer == 1 and pts.Controls.Engines.Engine.firePb[0].getBoolValue()) {
FWC.Flipflop.phase10Reset.setBoolValue(1); FWC.Flipflop.phase10Reset.setBoolValue(1);
} else { } else {
FWC.Flipflop.phase10Reset.setBoolValue(0); FWC.Flipflop.phase10Reset.setBoolValue(0);
} }
if ((FWC.Logic.gnd.getBoolValue() and FWC.Timer.eng1and2Off.getValue() and myPhase == 9) and FWC.Flipflop.phase10Output.getBoolValue()) { if ((gnd and FWC.Timer.eng1and2Off.getValue() and myPhase == 9) and FWC.Flipflop.phase10Output.getBoolValue()) {
FWC.Monostable.phase1.setBoolValue(1); # true for 300 sec then false FWC.Monostable.phase1.setBoolValue(1); # true for 300 sec then false
} else { } else {
FWC.Monostable.phase1.setBoolValue(0); FWC.Monostable.phase1.setBoolValue(0);
@ -121,7 +125,7 @@ var phaseLoop = func() {
FWC.Flipflop.phase2Set.setBoolValue(0); FWC.Flipflop.phase2Set.setBoolValue(0);
} }
if (!FWC.Monostable.m80kt.getBoolValue() and myPhase != 9 and ((!FWC.Monostable.phase9Output.getBoolValue() and FWC.Timer.gnd.getValue() == 1) or (!FWC.Monostable.toPowerOutput.getBoolValue() and FWC.Timer.gnd.getValue() == 1))) { if (!FWC.Monostable.m80kt.getBoolValue() and myPhase != 9 and ((!FWC.Monostable.phase9Output.getBoolValue() and gndTimer == 1) or (!FWC.Monostable.toPowerOutput.getBoolValue() and gndTimer == 1))) {
FWC.Flipflop.phase2Reset.setBoolValue(1); FWC.Flipflop.phase2Reset.setBoolValue(1);
} else { } else {
FWC.Flipflop.phase2Reset.setBoolValue(0); FWC.Flipflop.phase2Reset.setBoolValue(0);
@ -130,33 +134,33 @@ var phaseLoop = func() {
gear_agl_cur = pts.Position.gearAglFt.getValue(); gear_agl_cur = pts.Position.gearAglFt.getValue();
# Phase 5 monostable # Phase 5 monostable
if (FWC.toPower.getBoolValue() and (!FWC.Logic.feet1500.getBoolValue() and !FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1)) { if (FWC.toPower.getBoolValue() and (!FWC.Logic.feet1500.getBoolValue() and !gnd and FWC.Timer.gnd2Sec.getValue() != 1)) {
FWC.Monostable.phase5.setBoolValue(1); FWC.Monostable.phase5.setBoolValue(1);
} else { } else {
FWC.Monostable.phase5.setBoolValue(0); FWC.Monostable.phase5.setBoolValue(0);
} }
# Phase 7 monostable # Phase 7 monostable
if (!FWC.toPower.getBoolValue() and !FWC.Logic.feet1500.getBoolValue() and !FWC.Logic.feet800.getBoolValue() and !FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1) { if (!FWC.toPower.getBoolValue() and !FWC.Logic.feet1500.getBoolValue() and !FWC.Logic.feet800.getBoolValue() and !gnd and FWC.Timer.gnd2Sec.getValue() != 1) {
FWC.Monostable.phase7.setBoolValue(1); FWC.Monostable.phase7.setBoolValue(1);
} else { } else {
FWC.Monostable.phase7.setBoolValue(0); FWC.Monostable.phase7.setBoolValue(0);
} }
# Actual Phases # Actual Phases
if ((FWC.Logic.gnd.getBoolValue() and FWC.Timer.eng1and2Off.getValue() and myPhase != 9) and !FWC.Monostable.phase1Output.getBoolValue()) { if ((gnd and FWC.Timer.eng1and2Off.getValue() and myPhase != 9) and !FWC.Monostable.phase1Output.getBoolValue()) {
setPhase(1); setPhase(1);
} }
if (FWC.Timer.eng1or2Output.getBoolValue() and (FWC.Logic.gnd.getBoolValue() and !FWC.toPower.getBoolValue() and !FWC.speed80.getBoolValue()) and !FWC.Flipflop.phase2Output.getBoolValue()) { if (FWC.Timer.eng1or2Output.getBoolValue() and (gnd and !FWC.toPower.getBoolValue() and !FWC.speed80.getBoolValue()) and !FWC.Flipflop.phase2Output.getBoolValue()) {
setPhase(2); setPhase(2);
} }
if (FWC.Timer.eng1or2Output.getBoolValue() and (FWC.Timer.gnd.getValue() == 1 and FWC.toPower.getBoolValue()) and !FWC.speed80.getBoolValue()) { if (FWC.Timer.eng1or2Output.getBoolValue() and (gndTimer == 1 and FWC.toPower.getBoolValue()) and !FWC.speed80.getBoolValue()) {
setPhase(3); setPhase(3);
} }
if ((FWC.Timer.gnd.getValue() == 1 and FWC.toPower.getBoolValue()) and FWC.speed80.getBoolValue()) { if ((gndTimer == 1 and FWC.toPower.getBoolValue()) and FWC.speed80.getBoolValue()) {
setPhase(4); setPhase(4);
} }
@ -164,7 +168,7 @@ var phaseLoop = func() {
setPhase(5); setPhase(5);
} }
if (!FWC.Logic.gnd.getValue() and FWC.Timer.gnd2SecHalf.getValue() != 1 and (!FWC.Monostable.phase5.getBoolValue() or !FWC.Monostable.phase5Output.getBoolValue()) and (!FWC.Monostable.phase7.getBoolValue() or !FWC.Monostable.phase7Output.getBoolValue())) { if (!gnd and FWC.Timer.gnd2SecHalf.getValue() != 1 and (!FWC.Monostable.phase5.getBoolValue() or !FWC.Monostable.phase5Output.getBoolValue()) and (!FWC.Monostable.phase7.getBoolValue() or !FWC.Monostable.phase7Output.getBoolValue())) {
setPhase(6); setPhase(6);
} }
@ -172,15 +176,15 @@ var phaseLoop = func() {
setPhase(7); setPhase(7);
} }
if (!FWC.toPower.getBoolValue() and FWC.speed80.getBoolValue() and (FWC.Logic.gnd.getBoolValue() or FWC.Timer.gnd2Sec.getValue == 1)) { if (!FWC.toPower.getBoolValue() and FWC.speed80.getBoolValue() and (gnd or FWC.Timer.gnd2Sec.getValue == 1)) {
setPhase(8); setPhase(8);
} }
if (FWC.Flipflop.phase2Output.getBoolValue() and (FWC.Logic.gnd.getBoolValue() and !FWC.toPower.getBoolValue() and !FWC.speed80.getBoolValue()) and FWC.Timer.eng1or2.getBoolValue()) { if (FWC.Flipflop.phase2Output.getBoolValue() and (gnd and !FWC.toPower.getBoolValue() and !FWC.speed80.getBoolValue()) and FWC.Timer.eng1or2.getBoolValue()) {
setPhase(9); setPhase(9);
} }
if ((FWC.Logic.gnd.getBoolValue() and FWC.Timer.eng1and2Off.getValue() and myPhase == 9) and FWC.Monostable.phase1Output.getBoolValue()) { if ((gnd and FWC.Timer.eng1and2Off.getValue() and myPhase == 9) and FWC.Monostable.phase1Output.getBoolValue()) {
setPhase(10); setPhase(10);
} }

View file

@ -64,6 +64,7 @@ var FBW = {
sec3: props.globals.getNode("/systems/failures/fctl/sec3"), sec3: props.globals.getNode("/systems/failures/fctl/sec3"),
fac1: props.globals.getNode("/systems/failures/fctl/fac1"), fac1: props.globals.getNode("/systems/failures/fctl/fac1"),
fac2: props.globals.getNode("/systems/failures/fctl/fac2"), fac2: props.globals.getNode("/systems/failures/fctl/fac2"),
ths: props.globals.getNode("/systems/failures/fctl/ths-jam"),
spoilerl1: props.globals.getNode("/systems/failures/spoilers/spoiler-l1"), spoilerl1: props.globals.getNode("/systems/failures/spoilers/spoiler-l1"),
spoilerl2: props.globals.getNode("/systems/failures/spoilers/spoiler-l2"), spoilerl2: props.globals.getNode("/systems/failures/spoilers/spoiler-l2"),
spoilerl3: props.globals.getNode("/systems/failures/spoilers/spoiler-l3"), spoilerl3: props.globals.getNode("/systems/failures/spoilers/spoiler-l3"),
@ -143,6 +144,7 @@ var FBW = {
me.Failures.sec3.setBoolValue(0); me.Failures.sec3.setBoolValue(0);
me.Failures.fac1.setBoolValue(0); me.Failures.fac1.setBoolValue(0);
me.Failures.fac2.setBoolValue(0); me.Failures.fac2.setBoolValue(0);
me.Failures.ths.setBoolValue(0);
me.Failures.spoilerl1.setBoolValue(0); me.Failures.spoilerl1.setBoolValue(0);
me.Failures.spoilerl2.setBoolValue(0); me.Failures.spoilerl2.setBoolValue(0);
me.Failures.spoilerl3.setBoolValue(0); me.Failures.spoilerl3.setBoolValue(0);
@ -191,7 +193,10 @@ var update_loop = func {
tripleIRFail = !ir1 and !ir2 and !ir3; tripleIRFail = !ir1 and !ir2 and !ir3;
doubleIRFail = (!ir1 and !ir2 and ir3) or (ir1 and !ir2 and !ir3) or (!ir1 and ir2 and !ir3); doubleIRFail = (!ir1 and !ir2 and ir3) or (ir1 and !ir2 and !ir3) or (!ir1 and ir2 and !ir3);
if (tripleADRFail or doubleADRFail or doubleIRFail or tripleIRFail or dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or blueGreenFail or dualELACFault or (!elac1 and elac2 and ((green < 1500 and yellow >= 1500) or (green >= 1500 and yellow < 1500))) or (!elac2 and elac1 and blue < 1500) or tripleSECFault or systems.ELEC.EmerElec.getBoolValue()) { if (dualELACFault and !sec1 and !sec2) {
FBW.degradeLaw.setValue(3);
FBW.apOff = 1;
} elsif (tripleADRFail or doubleADRFail or doubleIRFail or tripleIRFail or dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or blueGreenFail or dualELACFault or (!elac1 and elac2 and ((green < 1500 and yellow >= 1500) or (green >= 1500 and yellow < 1500))) or (!elac2 and elac1 and blue < 1500) or tripleSECFault or systems.ELEC.EmerElec.getBoolValue()) {
if (dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or (systems.ELEC.EmerElec.getBoolValue() and !fac1) or tripleIRFail) { if (dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or (systems.ELEC.EmerElec.getBoolValue() and !fac1) or tripleIRFail) {
if (lawyaw == 0 or lawyaw == 1) { if (lawyaw == 0 or lawyaw == 1) {
FBW.degradeYawLaw.setValue(2); FBW.degradeYawLaw.setValue(2);
@ -217,12 +222,6 @@ var update_loop = func {
FBW.apOff = 0; FBW.apOff = 0;
} }
if (dualELACFault and tripleSECFault and dualFACFault) {
FBW.degradeLaw.setValue(3);
FBW.apOff = 1;
}
# degrade loop runs faster; reset this variable # degrade loop runs faster; reset this variable
law = FBW.activeLaw.getValue(); law = FBW.activeLaw.getValue();
@ -238,12 +237,6 @@ var update_loop = func {
} }
} }
# If they can, laws can go back to standard law
if (law == 3) {
if (!dualELACFault or !tripleSECFault or !dualFACFault) {
FBW.degradeLaw.setValue(2);
}
}
cas = pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue(); cas = pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue();
mmoIAS = (cas / pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue()) * 0.82; mmoIAS = (cas / pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue()) * 0.82;

View file

@ -669,7 +669,7 @@ var masterFMGC = maketimer(0.2, func {
} elsif (pts.Gear.position[0].getValue() != 0 or pts.Gear.position[1].getValue() != 0 or pts.Gear.position[2].getValue() != 0) { } elsif (pts.Gear.position[0].getValue() != 0 or pts.Gear.position[1].getValue() != 0 or pts.Gear.position[2].getValue() != 0) {
FMGCInternal.maxspeed = 284; FMGCInternal.maxspeed = 284;
} else { } else {
FMGCInternal.maxspeed = getprop("/it-fbw/speeds/vmo-mmo"); FMGCInternal.maxspeed = fmgc.FMGCInternal.vmo_mmo;
} }
############################ ############################

View file

@ -14,8 +14,6 @@ var HYD = {
mode: props.globals.initNode("/systems/hydraulic/brakes/mode", 0, "INT"), mode: props.globals.initNode("/systems/hydraulic/brakes/mode", 0, "INT"),
leftbrake: props.globals.getNode("/controls/gear/brake-left"), leftbrake: props.globals.getNode("/controls/gear/brake-left"),
rightbrake: props.globals.getNode("/controls/gear/brake-right"), rightbrake: props.globals.getNode("/controls/gear/brake-right"),
lbrake: props.globals.initNode("/systems/hydraulic/brakes/lbrake", 0, "INT"),
rbrake: props.globals.initNode("/systems/hydraulic/brakes/rbrake", 0, "INT"),
noserubber: props.globals.initNode("/systems/hydraulic/brakes/nose-rubber", 0, "INT"), noserubber: props.globals.initNode("/systems/hydraulic/brakes/nose-rubber", 0, "INT"),
}, },
Fail: { Fail: {
@ -88,34 +86,22 @@ var HYD = {
me.Fail.yellowLeak.setBoolValue(0); me.Fail.yellowLeak.setBoolValue(0);
}, },
loop: func() { loop: func() {
if (me.Brakes.leftbrake.getValue() == 1) {
me.Brakes.lbrake.setValue(1);
} else {
me.Brakes.lbrake.setValue(0);
}
if (me.Brakes.rightbrake.getValue() == 1) {
me.Brakes.rbrake.setValue(1);
} else {
me.Brakes.rbrake.setValue(0);
}
if (props.globals.getValue("/controls/gear/nws-switch") == 1) { if (props.globals.getValue("/controls/gear/nws-switch") == 1) {
me.Brakes.askidSw.setBoolValue(1); #true me.Brakes.askidSw.setBoolValue(1); #true
} else { } else {
me.Brakes.askidSw.setBoolValue(0); #false me.Brakes.askidSw.setBoolValue(0); #false
} }
if (me.Brakes.mode.getValue() == 2) { if (me.Psi.yellow.getValue() > 0 and me.Brakes.accumPressPsi.getValue() < 3000 and me.Psi.yellow.getValue() > me.Brakes.accumPressPsi.getValue()) {
if (me.Psi.yellow.getValue() > 2500 and me.Brakes.accumPressPsi.getValue() < 700) {
me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() + 50); me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() + 50);
} }
}
# Decrease accumPressPsi when green and yellow hydraulic's aren't pressurized # Decrease accumPressPsi when green and yellow hydraulic's aren't pressurized
if (me.Brakes.leftbrake.getValue() > 0) { if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
lcont = lcont + 1; lcont = lcont + 1;
} else { } else {
lcont = 0; lcont = 0;
} }
if (me.Brakes.rightbrake.getValue() > 0) { if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
rcont = rcont + 1; rcont = rcont + 1;
} else { } else {
rcont = 0; rcont = 0;
@ -123,11 +109,11 @@ var HYD = {
if ((me.Psi.green.getValue() == 0) and (me.Psi.yellow.getValue() == 0) and (me.Brakes.accumPressPsi.getValue()) > 0) { if ((me.Psi.green.getValue() == 0) and (me.Psi.yellow.getValue() == 0) and (me.Brakes.accumPressPsi.getValue()) > 0) {
if (lcont == 1) { if (lcont == 1) {
#me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - (35 * me.Brakes.leftbrake.getValue())); #me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - (35 * me.Brakes.leftbrake.getValue()));
me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 35); me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 200);
} }
if (rcont == 1) { if (rcont == 1) {
#me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - (35 * me.Brakes.leftbrake.getValue())); #me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - (35 * me.Brakes.leftbrake.getValue()));
me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 35); me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 200);
} }
if (me.Brakes.accumPressPsi.getValue() < 0) { if (me.Brakes.accumPressPsi.getValue() < 0) {
me.Brakes.accumPressPsi.setValue(0); me.Brakes.accumPressPsi.setValue(0);
@ -137,26 +123,26 @@ var HYD = {
# Braking Pressure # Braking Pressure
if (me.Brakes.mode.getValue() == 1 or (me.Brakes.mode.getValue() == 2 and me.Psi.green.getValue() >= 2500)) { if (me.Brakes.mode.getValue() == 1 or (me.Brakes.mode.getValue() == 2 and me.Psi.green.getValue() >= 2500)) {
# Normal braking - Green OK # Normal braking - Green OK
if (me.Brakes.lbrake.getValue() > 0) { if (me.Brakes.leftbrake.getValue() > 0) {
me.Brakes.leftPressPsi.setValue(props.globals.getValue("/systems/hydraulic/green-psi-ptu")); me.Brakes.leftPressPsi.setValue(props.globals.getValue("/systems/hydraulic/green-psi-ptu"));
} else { } else {
me.Brakes.leftPressPsi.setValue(0); me.Brakes.leftPressPsi.setValue(0);
} }
if (me.Brakes.rbrake.getValue() > 0) { if (me.Brakes.rightbrake.getValue() > 0) {
me.Brakes.rightPressPsi.setValue(props.globals.getValue("/systems/hydraulic/green-psi-ptu")); me.Brakes.rightPressPsi.setValue(props.globals.getValue("/systems/hydraulic/green-psi-ptu"));
} else { } else {
me.Brakes.rightPressPsi.setValue(0); me.Brakes.rightPressPsi.setValue(0);
} }
} else { } else {
if (me.Brakes.mode.getValue() == 2 and me.Psi.green.getValue() < 2500) { if ((me.Brakes.mode.getValue() == 2 and me.Psi.green.getValue() < 2500) or me.Brakes.mode.getValue() == 0) {
# Alternate Braking (Yellow OK + Antiskid ON + electric OK) - missing condition: BSCU OK-KO # Alternate Braking (Yellow OK + Antiskid ON + electric OK) - missing condition: BSCU OK-KO
if (me.Psi.yellow.getValue() >= 2500 and me.Brakes.askidSw.getValue() and props.globals.getValue("/systems/electrical/serviceable")) { if (me.Psi.yellow.getValue() >= 2500 and me.Brakes.askidSw.getValue() and props.globals.getValue("/systems/electrical/serviceable")) {
if (me.Brakes.lbrake.getValue() > 0) { if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
me.Brakes.leftPressPsi.setValue(props.globals.getValue("/systems/hydraulic/yellow-psi-ptu")); me.Brakes.leftPressPsi.setValue(props.globals.getValue("/systems/hydraulic/yellow-psi-ptu"));
} else { } else {
me.Brakes.leftPressPsi.setValue(0); me.Brakes.leftPressPsi.setValue(0);
} }
if (me.Brakes.rbrake.getValue() > 0) { if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
me.Brakes.rightPressPsi.setValue(props.globals.getValue("/systems/hydraulic/yellow-psi-ptu")); me.Brakes.rightPressPsi.setValue(props.globals.getValue("/systems/hydraulic/yellow-psi-ptu"));
} else { } else {
me.Brakes.rightPressPsi.setValue(0); me.Brakes.rightPressPsi.setValue(0);
@ -164,12 +150,12 @@ var HYD = {
} else { } else {
# Alternate Braking (Yellow OK + Antiskid OFF + electric OK) - missing condition: BSCU OK-KO # Alternate Braking (Yellow OK + Antiskid OFF + electric OK) - missing condition: BSCU OK-KO
if (me.Psi.yellow.getValue() >= 2500 and !me.Brakes.askidSw.getValue() and props.globals.getValue("/systems/electrical/serviceable")) { if (me.Psi.yellow.getValue() >= 2500 and !me.Brakes.askidSw.getValue() and props.globals.getValue("/systems/electrical/serviceable")) {
if (me.Brakes.lbrake.getValue() > 0) { if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
me.Brakes.leftPressPsi.setValue(1000); me.Brakes.leftPressPsi.setValue(1000);
} else { } else {
me.Brakes.leftPressPsi.setValue(0); me.Brakes.leftPressPsi.setValue(0);
} }
if (me.Brakes.rbrake.getValue() > 0) { if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
me.Brakes.rightPressPsi.setValue(1000); me.Brakes.rightPressPsi.setValue(1000);
} else { } else {
me.Brakes.rightPressPsi.setValue(0); me.Brakes.rightPressPsi.setValue(0);
@ -177,12 +163,12 @@ var HYD = {
} else { } else {
# Alternate Braking (Yellow KO or Antiskid KO or electric KO) - missing condition: BSCU OK-KO # Alternate Braking (Yellow KO or Antiskid KO or electric KO) - missing condition: BSCU OK-KO
if (me.Psi.yellow.getValue() < 2500 or !me.Brakes.askidSw.getValue() or !props.globals.getValue("/systems/electrical/serviceable")) { if (me.Psi.yellow.getValue() < 2500 or !me.Brakes.askidSw.getValue() or !props.globals.getValue("/systems/electrical/serviceable")) {
if (me.Brakes.lbrake.getValue() > 0) { if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
me.Brakes.leftPressPsi.setValue(me.Brakes.accumPressPsi.getValue()); me.Brakes.leftPressPsi.setValue(me.Brakes.accumPressPsi.getValue());
} else { } else {
me.Brakes.leftPressPsi.setValue(0); me.Brakes.leftPressPsi.setValue(0);
} }
if (me.Brakes.rbrake.getValue() > 0) { if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
me.Brakes.rightPressPsi.setValue(me.Brakes.accumPressPsi.getValue()); me.Brakes.rightPressPsi.setValue(me.Brakes.accumPressPsi.getValue());
} else { } else {
me.Brakes.rightPressPsi.setValue(0); me.Brakes.rightPressPsi.setValue(0);

View file

@ -30,23 +30,7 @@ var execLoop = func
emesary.GlobalTransmitter.NotifyAll(notifications.frameNotification); emesary.GlobalTransmitter.NotifyAll(notifications.frameNotification);
notifications.frameNotification.FrameCount = notifications.frameNotification.FrameCount + 1; notifications.frameNotification.FrameCount = notifications.frameNotification.FrameCount + 1;
frame_inc = 0.0333; #30 Hz
if (notifications.frameNotification.frame_rate < 5) {
frame_inc = 0.25;#4 Hz
} elsif (notifications.frameNotification.frame_rate < 10) {
frame_inc = 0.125;#8 Hz
} elsif (notifications.frameNotification.frame_rate < 15) {
frame_inc = 0.10;#10 Hz
} elsif (notifications.frameNotification.frame_rate < 20) {
frame_inc = 0.075;#13.3 Hz
} elsif (notifications.frameNotification.frame_rate < 25) {
frame_inc = 0.05;#20 Hz
} elsif (notifications.frameNotification.frame_rate < 40) {
frame_inc = 0.0333;#30 Hz
} else {
frame_inc = 0.02;#50 Hz
}
if (frame_inc != cur_frame_inc) { if (frame_inc != cur_frame_inc) {
cur_frame_inc = frame_inc; cur_frame_inc = frame_inc;
} }

View file

@ -94,9 +94,15 @@
<switch name="hydraulics/aileron-l/pressure-switch-or"> <switch name="hydraulics/aileron-l/pressure-switch-or">
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="OR" value="1">
/systems/hydraulic/green-psi ge 1500 <test logic="AND">
/systems/fctl/elac1 eq 1
/systems/hydraulic/blue-psi ge 1500 /systems/hydraulic/blue-psi ge 1500
</test> </test>
<test logic="AND">
/systems/fctl/elac2 eq 1
/systems/hydraulic/green-psi ge 1500
</test>
</test>
</switch> </switch>
<switch name="hydraulics/aileron-l/switch"> <switch name="hydraulics/aileron-l/switch">
@ -167,9 +173,15 @@
<switch name="hydraulics/aileron-r/pressure-switch-or"> <switch name="hydraulics/aileron-r/pressure-switch-or">
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="OR" value="1">
<test logic="AND">
/systems/fctl/elac1 eq 1
/systems/hydraulic/green-psi ge 1500 /systems/hydraulic/green-psi ge 1500
</test>
<test logic="AND">
/systems/fctl/elac2 eq 1
/systems/hydraulic/blue-psi ge 1500 /systems/hydraulic/blue-psi ge 1500
</test> </test>
</test>
</switch> </switch>
<switch name="hydraulics/aileron-r/switch"> <switch name="hydraulics/aileron-r/switch">
@ -229,16 +241,42 @@
<switch name="hydraulics/elevator-l/pressure-switch-or"> <switch name="hydraulics/elevator-l/pressure-switch-or">
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="OR" value="1">
/systems/hydraulic/green-psi ge 1500 <test logic="AND">
<test logic="OR">
/systems/fctl/elac1 eq 1
/systems/fctl/sec1 eq 1
</test>
/systems/hydraulic/blue-psi ge 1500 /systems/hydraulic/blue-psi ge 1500
</test> </test>
<test logic="AND">
<test logic="OR">
/systems/fctl/elac2 eq 1
/systems/fctl/sec2 eq 1
</test>
/systems/hydraulic/green-psi ge 1500
</test>
</test>
</switch> </switch>
<switch name="hydraulics/elevator-l/switch"> <switch name="hydraulics/elevator-l/switch">
<default value="hydraulics/elevator-droop"/> <default value="hydraulics/elevator-droop"/>
<test logic="AND" value="0">
<test logic="OR">
/systems/hydraulic/blue-psi ge 1500
/systems/hydraulic/green-psi ge 1500
</test>
/systems/failures/elevator-left eq 0
<test logic="AND"> <!-- only pitch trim available -->
/systems/fctl/elac1 eq 0
/systems/fctl/sec1 eq 0
/systems/fctl/elac2 eq 0
/systems/fctl/sec2 eq 0
</test>
</test>
<test logic="AND" value="hydraulics/elevator-output-switch"> <test logic="AND" value="hydraulics/elevator-output-switch">
hydraulics/elevator-l/pressure-switch-or eq 1 hydraulics/elevator-l/pressure-switch-or eq 1
/systems/failures/elevator-left eq 0 /systems/failures/elevator-left eq 0
/it-fbw/law ne 3
</test> </test>
<clipto> <clipto>
<min>-1.0</min> <min>-1.0</min>
@ -269,16 +307,42 @@
<switch name="hydraulics/elevator-r/pressure-switch-or"> <switch name="hydraulics/elevator-r/pressure-switch-or">
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="OR" value="1">
/systems/hydraulic/yellow-psi ge 1500 <test logic="AND">
<test logic="OR">
/systems/fctl/elac1 eq 1
/systems/fctl/sec1 eq 1
</test>
/systems/hydraulic/blue-psi ge 1500 /systems/hydraulic/blue-psi ge 1500
</test> </test>
<test logic="AND">
<test logic="OR">
/systems/fctl/elac2 eq 1
/systems/fctl/sec2 eq 1
</test>
/systems/hydraulic/yellow-psi ge 1500
</test>
</test>
</switch> </switch>
<switch name="hydraulics/elevator-r/switch"> <switch name="hydraulics/elevator-r/switch">
<default value="hydraulics/elevator-droop"/> <default value="hydraulics/elevator-droop"/>
<test logic="AND" value="0">
<test logic="OR">
/systems/hydraulic/blue-psi ge 1500
/systems/hydraulic/yellow-psi ge 1500
</test>
/systems/failures/elevator-right eq 0
<test logic="AND"> <!-- only pitch trim available -->
/systems/fctl/elac1 eq 0
/systems/fctl/sec1 eq 0
/systems/fctl/elac2 eq 0
/systems/fctl/sec2 eq 0
</test>
</test>
<test logic="AND" value="hydraulics/elevator-output-switch"> <test logic="AND" value="hydraulics/elevator-output-switch">
hydraulics/elevator-r/pressure-switch-or eq 1 hydraulics/elevator-r/pressure-switch-or eq 1
/systems/failures/elevator-right eq 0 /systems/failures/elevator-right eq 0
/it-fbw/law ne 3
</test> </test>
<clipto> <clipto>
<min>-1.0</min> <min>-1.0</min>
@ -307,7 +371,10 @@
<channel name="Pitch Trim"> <channel name="Pitch Trim">
<switch name="hydraulics/elevator-trim/rate"> <switch name="hydraulics/elevator-trim/rate">
<default value="0.125"/> <default value="0"/> <!-- only mechanical input to hyd actuator. So it does need hydraulic power -->
<test logic="OR" value="0">
/systems/failures/fctl/ths-jam eq 1
</test>
<test logic="OR" value="0.25"> <test logic="OR" value="0.25">
/systems/hydraulic/yellow-psi ge 1500 /systems/hydraulic/yellow-psi ge 1500
/systems/hydraulic/green-psi ge 1500 /systems/hydraulic/green-psi ge 1500

View file

@ -2048,6 +2048,117 @@
<rate_limit sense="incr">3.33333333333</rate_limit> <!-- 0.3 seconds --> <rate_limit sense="incr">3.33333333333</rate_limit> <!-- 0.3 seconds -->
</actuator> </actuator>
<switch name="/ECAM/warnings/fctl/leftElevFault-cond">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
<test logic="AND">
/systems/fctl/elac1 eq 0
/systems/fctl/sec1 eq 0
</test>
/systems/hydraulic/blue-psi lt 1500
</test>
<test logic="OR">
<test logic="AND">
/systems/fctl/elac2 eq 0
/systems/fctl/sec2 eq 0
</test>
/systems/hydraulic/green-psi lt 1500
</test>
</test>
</switch>
<switch name="/ECAM/warnings/fctl/leftElevFault">
<default value="0"/>
<test logic="AND" value="1">
/systems/hydraulic/blue-psi ge 1500
/systems/hydraulic/green-psi ge 1500
/systems/electrical/bus/dc-2 ge 25
/ECAM/warnings/fctl/lrElevFault ne 1
<test logic="OR">
/controls/fctl/switches/elac1 eq 1
/controls/fctl/switches/elac2 eq 1
/controls/fctl/switches/sec1 eq 1
/controls/fctl/switches/sec2 eq 1
</test>
/ECAM/warnings/fctl/leftElevFault-cond eq 1
</test>
</switch>
<actuator name="/ECAM/warnings/fctl/leftElevFault-output">
<input>/ECAM/warnings/fctl/leftElevFault</input>
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
<rate_limit sense="incr">3.33333333333</rate_limit> <!-- 0.3 seconds -->
</actuator>
<switch name="/ECAM/warnings/fctl/rightElevFault-cond">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
<test logic="AND">
/systems/fctl/elac1 eq 0
/systems/fctl/sec1 eq 0
</test>
/systems/hydraulic/blue-psi lt 1500
</test>
<test logic="OR">
<test logic="AND">
/systems/fctl/elac2 eq 0
/systems/fctl/sec2 eq 0
</test>
/systems/hydraulic/yellow-psi lt 1500
</test>
</test>
</switch>
<switch name="/ECAM/warnings/fctl/rightElevFault">
<default value="0"/>
<test logic="AND" value="1">
/systems/hydraulic/blue-psi ge 1500
/systems/hydraulic/yellow-psi ge 1500
/systems/electrical/bus/dc-2 ge 25
/ECAM/warnings/fctl/lrElevFault ne 1
<test logic="OR">
/controls/fctl/switches/elac1 eq 1
/controls/fctl/switches/elac2 eq 1
/controls/fctl/switches/sec1 eq 1
/controls/fctl/switches/sec2 eq 1
</test>
/ECAM/warnings/fctl/rightElevFault-cond eq 1
</test>
</switch>
<actuator name="/ECAM/warnings/fctl/rightElevFault-output">
<input>/ECAM/warnings/fctl/rightElevFault</input>
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
<rate_limit sense="incr">3.33333333333</rate_limit> <!-- 0.3 seconds -->
</actuator>
<switch name="/ECAM/warnings/fctl/altn-law">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warning-phase ne 1
/ECAM/warning-phase ne 10
/it-fbw/law eq 1
</test>
</switch>
<actuator name="/ECAM/warnings/fctl/altn-law-output">
<input>/ECAM/warnings/fctl/altn-law</input>
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
<rate_limit sense="incr">3.33333333333</rate_limit> <!-- 0.3 seconds -->
</actuator>
<switch name="/ECAM/warnings/fctl/direct-law-output">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warning-phase ne 1
/ECAM/warning-phase ne 10
/it-fbw/law eq 2
</test>
</switch>
<switch name="/ECAM/warnings/fctl/gear-not-down-not-cancellable"> <switch name="/ECAM/warnings/fctl/gear-not-down-not-cancellable">
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">

View file

@ -136,7 +136,7 @@
<property>/it-autoflight/internal/alt</property> <property>/it-autoflight/internal/alt</property>
</input> </input>
<reference> <reference>
<property>/position/gear-agl-ft</property> <property>/instrumentation/altimeter/indicated-altitude-ft</property>
</reference> </reference>
<output>/instrumentation/pfd/alt-diff</output> <output>/instrumentation/pfd/alt-diff</output>
</filter> </filter>