Merge branch 'dev' of github.com:legoboyvdlp/A320-family into dev
This commit is contained in:
commit
9c359e4d62
16 changed files with 574 additions and 231 deletions
|
@ -278,6 +278,18 @@
|
|||
|
||||
<menubar>
|
||||
<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">
|
||||
<label>|</label>
|
||||
<enabled type="bool">false</enabled>
|
||||
|
@ -753,9 +765,6 @@
|
|||
<overspeed-roll-back type="bool">0</overspeed-roll-back>
|
||||
</protections>
|
||||
<spd-hld type="bool">0</spd-hld>
|
||||
<speeds>
|
||||
<vmo-mmo type="int">350</vmo-mmo>
|
||||
</speeds>
|
||||
</it-fbw>
|
||||
|
||||
<FMGC n="0">
|
||||
|
@ -1287,6 +1296,7 @@
|
|||
<fac2 type="bool">0</fac2>
|
||||
<rtlu-1 type="bool">0</rtlu-1>
|
||||
<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-2 type="bool">0</yaw-damper-2>
|
||||
</fctl>
|
||||
|
@ -1572,8 +1582,8 @@
|
|||
<instrumentation n="0">
|
||||
<altimeter n="0">
|
||||
<inhg type="bool">0</inhg>
|
||||
<indicated-altitude-ft tyep="double">0</indicated-altitude-ft>
|
||||
<indicated-altitude-ft-pfd tyep="double">0</indicated-altitude-ft-pfd>
|
||||
<indicated-altitude-ft type="double">0</indicated-altitude-ft>
|
||||
<indicated-altitude-ft-pfd type="double">0</indicated-altitude-ft-pfd>
|
||||
<oldqnh type="double">29.92</oldqnh>
|
||||
<serviceable type="bool">true</serviceable>
|
||||
<std type="bool">0</std>
|
||||
|
|
|
@ -144,6 +144,16 @@
|
|||
<live>true</live>
|
||||
</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>
|
||||
<label>Yaw Damper 1</label>
|
||||
<halign>left</halign>
|
||||
|
|
|
@ -367,10 +367,26 @@
|
|||
<property>systems/hydraulic/brakes/pressure-left-psi</property>
|
||||
<factor>-0.03</factor>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
<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>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<axis>
|
||||
<object-name>brakes_lb_psi.axis</object-name>
|
||||
|
@ -383,10 +399,26 @@
|
|||
<property>systems/hydraulic/brakes/pressure-right-psi</property>
|
||||
<factor>0.03</factor>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
<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>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<axis>
|
||||
<object-name>brakes_rb_psi.axis</object-name>
|
||||
|
@ -399,16 +431,10 @@
|
|||
<property>systems/hydraulic/brakes/accumulator-pressure-psi</property>
|
||||
<interpolation>
|
||||
<entry><ind>0</ind><dep>0</dep></entry>
|
||||
<entry><ind>700</ind><dep>-66</dep></entry>
|
||||
<entry><ind>2000</ind><dep>-78</dep></entry>
|
||||
<entry><ind>3000</ind><dep>-90</dep></entry>
|
||||
<entry><ind>700</ind><dep>-20</dep></entry>
|
||||
<entry><ind>2000</ind><dep>-44</dep></entry>
|
||||
<entry><ind>3000</ind><dep>-66</dep></entry>
|
||||
</interpolation>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>systems/hydraulic/brakes/mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<axis>
|
||||
<object-name>brakes_accum_psi.axis</object-name>
|
||||
</axis>
|
||||
|
|
|
@ -36,6 +36,15 @@ var tr2_v = 0;
|
|||
var tr2_a = 0;
|
||||
var essTramps = 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
|
||||
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 bmc1working = props.globals.getNode("/systems/pneumatics/indicating/bmc1-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 switch_wing_aice = props.globals.getNode("/controls/ice-protection/wing", 1);
|
||||
var pack1_bypass = props.globals.getNode("/systems/pneumatics/pack-1-bypass", 1);
|
||||
|
@ -650,14 +661,15 @@ var canvas_lowerECAM_bleed = {
|
|||
update: func() {
|
||||
# X BLEED
|
||||
xbleedstate = xbleed.getValue();
|
||||
if (xbleedcmd.getBoolValue() != xbleedstate) {
|
||||
xbleedcmdstate = xbleedcmd.getBoolValue();
|
||||
if (xbleedcmdstate != xbleedstate) {
|
||||
me["BLEED-XFEED"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["BLEED-XFEED"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
|
||||
if (xbleedcmd.getBoolValue() == xbleedstate) {
|
||||
if (xbleedcmd.getBoolValue()) {
|
||||
if (xbleedcmdstate == xbleedstate) {
|
||||
if (xbleedcmdstate) {
|
||||
me["BLEED-XFEED"].setRotation(0);
|
||||
} else {
|
||||
me["BLEED-XFEED"].setRotation(90 * D2R);
|
||||
|
@ -675,7 +687,7 @@ var canvas_lowerECAM_bleed = {
|
|||
}
|
||||
|
||||
# HP valve 1
|
||||
var hp_valve_state = hp_valve1_state.getValue();
|
||||
hp_valve_state = hp_valve1_state.getValue();
|
||||
|
||||
if (hp_valve_state == 1) {
|
||||
me["BLEED-HP-Valve-1"].setRotation(90 * D2R);
|
||||
|
@ -692,8 +704,8 @@ var canvas_lowerECAM_bleed = {
|
|||
}
|
||||
|
||||
# HP valve 2
|
||||
var hp_valve_state = hp_valve2_state.getValue();
|
||||
|
||||
hp_valve_state = hp_valve2_state.getValue();
|
||||
|
||||
if (hp_valve_state == 1) {
|
||||
me["BLEED-HP-Valve-2"].setRotation(90 * D2R);
|
||||
me["BLEED-HP-2-connection"].show();
|
||||
|
@ -709,15 +721,16 @@ var canvas_lowerECAM_bleed = {
|
|||
}
|
||||
|
||||
# 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);
|
||||
} else {
|
||||
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);
|
||||
} else {
|
||||
me["BLEED-ENG-1"].setColor(0.7333,0.3803,0);
|
||||
|
@ -758,21 +771,25 @@ var canvas_lowerECAM_bleed = {
|
|||
|
||||
# ENG BLEED valve 2
|
||||
eng_valve_state = systems.PNEU.Switch.bleed2.getValue();
|
||||
|
||||
if (eng_valve2.getValue() == 0) {
|
||||
bleed_valve_cur = eng_valve2.getValue();
|
||||
|
||||
if (bleed_valve_cur == 0) {
|
||||
me["BLEED-ENG-2"].setRotation(0);
|
||||
} else {
|
||||
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);
|
||||
} else {
|
||||
me["BLEED-ENG-2"].setColor(0.7333,0.3803,0);
|
||||
}
|
||||
|
||||
# Precooler inlet 1
|
||||
if (bmc1working.getValue()) {
|
||||
bmc1 = bmc1working.getValue();
|
||||
bmc2 = bmc2working.getValue();
|
||||
|
||||
if (bmc1) {
|
||||
var precooler_psi = precooler1_psi.getValue();
|
||||
me["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi)));
|
||||
if (precooler_psi < 4 or precooler_psi > 57) {
|
||||
|
@ -786,7 +803,7 @@ var canvas_lowerECAM_bleed = {
|
|||
}
|
||||
|
||||
# Precooler inlet 2
|
||||
if (bmc2working.getValue()) {
|
||||
if (bmc2) {
|
||||
var precooler_psi = precooler2_psi.getValue();
|
||||
me["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi)));
|
||||
if (precooler_psi < 4 or precooler_psi > 57) {
|
||||
|
@ -800,7 +817,7 @@ var canvas_lowerECAM_bleed = {
|
|||
}
|
||||
|
||||
# Precooler outlet 1
|
||||
if (bmc1working.getValue()) {
|
||||
if (bmc1) {
|
||||
var precooler_temp = precooler1_temp.getValue();
|
||||
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())) {
|
||||
|
@ -814,7 +831,7 @@ var canvas_lowerECAM_bleed = {
|
|||
}
|
||||
|
||||
# Precooler outlet 2
|
||||
if (bmc2working.getValue()) {
|
||||
if (bmc2) {
|
||||
var precooler_temp = precooler2_temp.getValue();
|
||||
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())) {
|
||||
|
@ -858,6 +875,7 @@ var canvas_lowerECAM_bleed = {
|
|||
}
|
||||
|
||||
# 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-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);
|
||||
}
|
||||
|
||||
var bypass_pos = pack1_bypass.getValue() - 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(bypass_pos);
|
||||
# `-50` cause the middel position from where we move the needle is at 50
|
||||
me["BLEED-Pack-1-Bypass-needle"].setRotation((pack1_bypass.getValue() - 50) * D2R);
|
||||
|
||||
if (systems.PNEU.Packs.pack1OutletTemp.getValue() > 230) {
|
||||
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);
|
||||
}
|
||||
|
||||
var flow_pos = systems.PNEU.Packs.packFlow1.getValue() * D2R;
|
||||
me["BLEED-Pack-1-Packflow-needle"].setRotation(flow_pos);
|
||||
me["BLEED-Pack-1-Packflow-needle"].setRotation(systems.PNEU.Packs.packFlow1.getValue() * D2R);
|
||||
|
||||
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-Flow-Valve"].setRotation(90 * D2R);
|
||||
} else {
|
||||
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);
|
||||
} 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);
|
||||
} else {
|
||||
me["BLEED-Pack-1-Flow-Valve"].setColor(0.7333,0.3803,0);
|
||||
}
|
||||
|
||||
# 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-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);
|
||||
}
|
||||
|
||||
var bypass_pos = pack2_bypass.getValue() - 50; # `-50` cause the middel position from where we move the needle is at 50
|
||||
bypass_pos = bypass_pos * D2R;
|
||||
me["BLEED-Pack-2-Bypass-needle"].setRotation(bypass_pos);
|
||||
me["BLEED-Pack-2-Bypass-needle"].setRotation((pack2_bypass.getValue() - 50) * D2R);
|
||||
|
||||
if (systems.PNEU.Packs.pack2OutletTemp.getValue() > 230) {
|
||||
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);
|
||||
}
|
||||
|
||||
flow_pos = systems.PNEU.Packs.packFlow2.getValue() * D2R;
|
||||
me["BLEED-Pack-2-Packflow-needle"].setRotation(flow_pos);
|
||||
me["BLEED-Pack-2-Packflow-needle"].setRotation(systems.PNEU.Packs.packFlow2.getValue() * D2R);
|
||||
|
||||
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-Flow-Valve"].setRotation(90 * D2R);
|
||||
} else {
|
||||
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);
|
||||
} 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);
|
||||
} else {
|
||||
me["BLEED-Pack-2-Flow-Valve"].setColor(0.7333,0.3803,0);
|
||||
}
|
||||
|
||||
# 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"].setColor(0.0509,0.7529,0.2941);
|
||||
me["BLEED-Ram-Air"].setColorFill(0.0509,0.7529,0.2941);
|
||||
me["BLEED-Ram-Air-connection"].hide();
|
||||
} elsif (systems.PNEU.Valves.ramAir.getValue()) {
|
||||
} elsif (ramAirState) {
|
||||
me["BLEED-Ram-Air"].setRotation(0);
|
||||
if (pts.Gear.wow[1].getValue()) {
|
||||
me["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
|
||||
|
@ -966,7 +971,7 @@ var canvas_lowerECAM_bleed = {
|
|||
|
||||
# Triangles
|
||||
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-2"].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",
|
||||
"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",
|
||||
"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() {
|
||||
blue_psi = systems.HYD.Psi.blue.getValue();
|
||||
green_psi = systems.HYD.Psi.green.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
|
||||
me["PT"].setText(sprintf("%2.1f", math.round(elevator_trim_deg.getValue(), 0.1)));
|
||||
|
@ -1976,16 +1985,26 @@ var canvas_lowerECAM_fctl = {
|
|||
me["PTupdn"].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
|
||||
me["ailL"].setTranslation(0, aileron_ind_left.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["ailR"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -1993,13 +2012,13 @@ var canvas_lowerECAM_fctl = {
|
|||
me["elevL"].setTranslation(0, elevator_ind_left.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);
|
||||
} else {
|
||||
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);
|
||||
} else {
|
||||
me["elevR"].setColor(0.0509,0.7529,0.2941);
|
||||
|
@ -2237,34 +2256,34 @@ var canvas_lowerECAM_fctl = {
|
|||
}
|
||||
|
||||
# Flight Computers
|
||||
if (fbw.FBW.Computers.elac1.getValue()) {
|
||||
if (elac1Node) {
|
||||
me["elac1"].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["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["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["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["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["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["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["path4249-3-6-7-5"].setColor(0.7333,0.3803,0);
|
||||
}
|
||||
|
@ -2279,10 +2298,23 @@ var canvas_lowerECAM_fctl = {
|
|||
|
||||
# Hydraulic Indicators
|
||||
if (blue_psi >= 1500) {
|
||||
me["ailLblue"].setColor(0.0509,0.7529,0.2941);
|
||||
me["ailRblue"].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);
|
||||
if (elac1Node) {
|
||||
me["ailLblue"].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["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["spdbrkblue"].setColor(0.0509,0.7529,0.2941);
|
||||
} else {
|
||||
|
@ -2295,9 +2327,22 @@ var canvas_lowerECAM_fctl = {
|
|||
}
|
||||
|
||||
if (green_psi >= 1500) {
|
||||
me["ailLgreen"].setColor(0.0509,0.7529,0.2941);
|
||||
me["ailRgreen"].setColor(0.0509,0.7529,0.2941);
|
||||
me["elevLgreen"].setColor(0.0509,0.7529,0.2941);
|
||||
if (elac2Node or sec2Node) {
|
||||
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["PTgreen"].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) {
|
||||
me["elevRyellow"].setColor(0.0509,0.7529,0.2941);
|
||||
if (elac2Node or sec2Node) {
|
||||
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["PTyellow"].setColor(0.0509,0.7529,0.2941);
|
||||
me["spdbrkyellow"].setColor(0.0509,0.7529,0.2941);
|
||||
|
|
|
@ -512,21 +512,19 @@ var canvas_PFD_base = {
|
|||
me["FMA_rollarm_box"].hide();
|
||||
me["FMA_Middle1"].hide();
|
||||
me["FMA_Middle2"].hide();
|
||||
if (wow1.getValue() == 0) {
|
||||
if (fbw_curlaw == 2) {
|
||||
me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM");
|
||||
me["FMA_ctr_msg"].setColor(0.7333,0.3803,0);
|
||||
me["FMA_ctr_msg"].show();
|
||||
} else if (fbw_curlaw == 3) {
|
||||
me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY");
|
||||
me["FMA_ctr_msg"].setColor(1,0,0);
|
||||
me["FMA_ctr_msg"].show();
|
||||
} else {
|
||||
me["FMA_ctr_msg"].hide();
|
||||
}
|
||||
|
||||
if (ecam.directLaw.active) {
|
||||
me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM");
|
||||
me["FMA_ctr_msg"].setColor(0.7333,0.3803,0);
|
||||
me["FMA_ctr_msg"].show();
|
||||
} else if (fbw_curlaw == 3) {
|
||||
me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY");
|
||||
me["FMA_ctr_msg"].setColor(1,0,0);
|
||||
me["FMA_ctr_msg"].show();
|
||||
} else {
|
||||
me["FMA_ctr_msg"].hide();
|
||||
}
|
||||
|
||||
me["FMA_combined"].show();
|
||||
if (pitch_box.getValue() == 1 and pitch_mode_act != " ") {
|
||||
me["FMA_combined_box"].show();
|
||||
|
@ -536,24 +534,18 @@ var canvas_PFD_base = {
|
|||
} else {
|
||||
me["FMA_combined"].hide();
|
||||
me["FMA_combined_box"].hide();
|
||||
if (wow1.getValue() == 0) {
|
||||
if (fbw_curlaw == 2) {
|
||||
me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM");
|
||||
me["FMA_ctr_msg"].setColor(0.7333,0.3803,0);
|
||||
me["FMA_Middle1"].hide();
|
||||
me["FMA_Middle2"].show();
|
||||
me["FMA_ctr_msg"].show();
|
||||
} else if (fbw_curlaw == 3) {
|
||||
me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY");
|
||||
me["FMA_ctr_msg"].setColor(1,0,0);
|
||||
me["FMA_Middle1"].hide();
|
||||
me["FMA_Middle2"].show();
|
||||
me["FMA_ctr_msg"].show();
|
||||
} else {
|
||||
me["FMA_ctr_msg"].hide();
|
||||
me["FMA_Middle1"].show();
|
||||
me["FMA_Middle2"].hide();
|
||||
}
|
||||
if (ecam.directLaw.active) {
|
||||
me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM");
|
||||
me["FMA_ctr_msg"].setColor(0.7333,0.3803,0);
|
||||
me["FMA_Middle1"].hide();
|
||||
me["FMA_Middle2"].show();
|
||||
me["FMA_ctr_msg"].show();
|
||||
} else if (fbw_curlaw == 3) {
|
||||
me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY");
|
||||
me["FMA_ctr_msg"].setColor(1,0,0);
|
||||
me["FMA_Middle1"].hide();
|
||||
me["FMA_Middle2"].show();
|
||||
me["FMA_ctr_msg"].show();
|
||||
} else {
|
||||
me["FMA_ctr_msg"].hide();
|
||||
me["FMA_Middle1"].show();
|
||||
|
@ -1278,7 +1270,6 @@ var canvas_PFD_1 = {
|
|||
}
|
||||
|
||||
me["ASI_scale"].setTranslation(0, me.ASI * 6.6);
|
||||
|
||||
if (fbw.FBW.Computers.fac1.getValue() or fbw.FBW.Computers.fac2.getValue()) {
|
||||
me["ASI_max"].setTranslation(0, me.ASImax * -6.6);
|
||||
me["ASI_max"].show();
|
||||
|
|
|
@ -74,6 +74,8 @@ var warningNodes = {
|
|||
blueYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-fuel-consumpt"),
|
||||
greenYellow: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-failure"),
|
||||
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: {
|
||||
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"),
|
||||
eng2AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-closed-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"),
|
||||
waiRhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-right"),
|
||||
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"),
|
||||
yawDamper2Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-2-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: {
|
||||
apuGenFault: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault"),
|
||||
|
|
|
@ -875,23 +875,6 @@ var messages_priority_3 = func {
|
|||
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 {
|
||||
ECAM_controller.warningReset(emerconfig);
|
||||
ECAM_controller.warningReset(emerconfigMinRat);
|
||||
|
@ -909,9 +892,6 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(emerconfigBusTie2);
|
||||
ECAM_controller.warningReset(emerconfigAPU);
|
||||
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()) {
|
||||
|
@ -1290,6 +1270,109 @@ var messages_priority_2 = func {
|
|||
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) {
|
||||
athr_offw.active = 1;
|
||||
athr_offw_1.active = 1;
|
||||
|
|
|
@ -155,9 +155,6 @@ var warnings = std.Vector.new([
|
|||
var emerconfigBusTie2 = warning.new(msg: " -BUS TIE...........AUTO", colour: "c"),
|
||||
var emerconfigAPU = warning.new(msg: " -APU (IF AVAIL)...START", 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
|
||||
var hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
|
||||
|
@ -260,10 +257,36 @@ var warnings = std.Vector.new([
|
|||
var gen2faultGen3 = warning.new(msg: "-GEN 2..............OFF", colour: "c"),
|
||||
|
||||
# APU GEN FAULT
|
||||
var apuGenfault = warning.new(msg: "ELEC APU GEN FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var apuGenfaultGen = warning.new(msg: "-APU GEN....OFF THEN ON", colour: "c"),
|
||||
var apuGenfaultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
|
||||
var apuGenfaultGen3 = warning.new(msg: "-APU GEN............OFF", colour: "c"),
|
||||
var apuGenfault = warning.new(msg: "ELEC APU GEN FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var apuGenfaultGen = warning.new(msg: "-APU GEN....OFF THEN ON", colour: "c"),
|
||||
var apuGenfaultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
|
||||
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
|
||||
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
|
@ -275,7 +298,7 @@ var warnings = std.Vector.new([
|
|||
|
||||
# TCAS FAULT
|
||||
var tcasFault = warning.new(msg: "NAV TCAS FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var tcasStby = warning.new(msg: "NAV TCAS STBY", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var tcasStby = warning.new(msg: "NAV TCAS STBY", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var gpwsFault = warning.new(msg: "NAV GPWS FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var gpwsFaultOff = warning.new(msg: "-GPWS...............OFF", colour: "c"),
|
||||
var gpwsTerrFault = warning.new(msg: "NAV GPWS TERR DET FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
|
|
|
@ -72,6 +72,9 @@ var FWC = {
|
|||
altChg: props.globals.getNode("/it-autoflight/input/alt-is-changing", 1),
|
||||
};
|
||||
|
||||
var gnd = nil;
|
||||
var gndTimer = nil;
|
||||
|
||||
var phaseLoop = func() {
|
||||
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; }
|
||||
|
@ -84,7 +87,8 @@ var phaseLoop = func() {
|
|||
eng2n1 = pts.Engines.Engine.n1Actual[1].getValue();
|
||||
master1 = pts.Controls.Engines.Engine.cutoffSw[0].getBoolValue();
|
||||
master2 = pts.Controls.Engines.Engine.cutoffSw[1].getBoolValue();
|
||||
|
||||
gnd = FWC.Logic.gnd.getBoolValue();
|
||||
gndTimer = FWC.Timer.gnd.getValue();
|
||||
FWC.Flipflop.recallReset.setValue(0);
|
||||
|
||||
# Various things
|
||||
|
@ -102,13 +106,13 @@ var phaseLoop = func() {
|
|||
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);
|
||||
} else {
|
||||
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
|
||||
} else {
|
||||
FWC.Monostable.phase1.setBoolValue(0);
|
||||
|
@ -121,7 +125,7 @@ var phaseLoop = func() {
|
|||
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);
|
||||
} else {
|
||||
FWC.Flipflop.phase2Reset.setBoolValue(0);
|
||||
|
@ -130,33 +134,33 @@ var phaseLoop = func() {
|
|||
gear_agl_cur = pts.Position.gearAglFt.getValue();
|
||||
|
||||
# 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);
|
||||
} else {
|
||||
FWC.Monostable.phase5.setBoolValue(0);
|
||||
}
|
||||
|
||||
# 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);
|
||||
} else {
|
||||
FWC.Monostable.phase7.setBoolValue(0);
|
||||
}
|
||||
|
||||
# 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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -164,7 +168,7 @@ var phaseLoop = func() {
|
|||
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);
|
||||
}
|
||||
|
||||
|
@ -172,15 +176,15 @@ var phaseLoop = func() {
|
|||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ var FBW = {
|
|||
sec3: props.globals.getNode("/systems/failures/fctl/sec3"),
|
||||
fac1: props.globals.getNode("/systems/failures/fctl/fac1"),
|
||||
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"),
|
||||
spoilerl2: props.globals.getNode("/systems/failures/spoilers/spoiler-l2"),
|
||||
spoilerl3: props.globals.getNode("/systems/failures/spoilers/spoiler-l3"),
|
||||
|
@ -143,6 +144,7 @@ var FBW = {
|
|||
me.Failures.sec3.setBoolValue(0);
|
||||
me.Failures.fac1.setBoolValue(0);
|
||||
me.Failures.fac2.setBoolValue(0);
|
||||
me.Failures.ths.setBoolValue(0);
|
||||
me.Failures.spoilerl1.setBoolValue(0);
|
||||
me.Failures.spoilerl2.setBoolValue(0);
|
||||
me.Failures.spoilerl3.setBoolValue(0);
|
||||
|
@ -191,7 +193,10 @@ var update_loop = func {
|
|||
tripleIRFail = !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 (lawyaw == 0 or lawyaw == 1) {
|
||||
FBW.degradeYawLaw.setValue(2);
|
||||
|
@ -216,12 +221,6 @@ var update_loop = func {
|
|||
FBW.degradeLaw.setValue(0);
|
||||
FBW.apOff = 0;
|
||||
}
|
||||
|
||||
if (dualELACFault and tripleSECFault and dualFACFault) {
|
||||
FBW.degradeLaw.setValue(3);
|
||||
FBW.apOff = 1;
|
||||
}
|
||||
|
||||
|
||||
# degrade loop runs faster; reset this variable
|
||||
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();
|
||||
mmoIAS = (cas / pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue()) * 0.82;
|
||||
|
|
|
@ -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) {
|
||||
FMGCInternal.maxspeed = 284;
|
||||
} else {
|
||||
FMGCInternal.maxspeed = getprop("/it-fbw/speeds/vmo-mmo");
|
||||
FMGCInternal.maxspeed = fmgc.FMGCInternal.vmo_mmo;
|
||||
}
|
||||
|
||||
############################
|
||||
|
|
|
@ -14,8 +14,6 @@ var HYD = {
|
|||
mode: props.globals.initNode("/systems/hydraulic/brakes/mode", 0, "INT"),
|
||||
leftbrake: props.globals.getNode("/controls/gear/brake-left"),
|
||||
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"),
|
||||
},
|
||||
Fail: {
|
||||
|
@ -88,34 +86,22 @@ var HYD = {
|
|||
me.Fail.yellowLeak.setBoolValue(0);
|
||||
},
|
||||
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) {
|
||||
me.Brakes.askidSw.setBoolValue(1); #true
|
||||
} else {
|
||||
me.Brakes.askidSw.setBoolValue(0); #false
|
||||
}
|
||||
if (me.Brakes.mode.getValue() == 2) {
|
||||
if (me.Psi.yellow.getValue() > 2500 and me.Brakes.accumPressPsi.getValue() < 700) {
|
||||
if (me.Psi.yellow.getValue() > 0 and me.Brakes.accumPressPsi.getValue() < 3000 and me.Psi.yellow.getValue() > me.Brakes.accumPressPsi.getValue()) {
|
||||
me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() + 50);
|
||||
}
|
||||
}
|
||||
|
||||
# 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;
|
||||
} else {
|
||||
lcont = 0;
|
||||
}
|
||||
if (me.Brakes.rightbrake.getValue() > 0) {
|
||||
if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
rcont = rcont + 1;
|
||||
} else {
|
||||
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 (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.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 200);
|
||||
}
|
||||
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.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 200);
|
||||
}
|
||||
if (me.Brakes.accumPressPsi.getValue() < 0) {
|
||||
me.Brakes.accumPressPsi.setValue(0);
|
||||
|
@ -137,26 +123,26 @@ var HYD = {
|
|||
# Braking Pressure
|
||||
if (me.Brakes.mode.getValue() == 1 or (me.Brakes.mode.getValue() == 2 and me.Psi.green.getValue() >= 2500)) {
|
||||
# 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"));
|
||||
} else {
|
||||
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"));
|
||||
} else {
|
||||
me.Brakes.rightPressPsi.setValue(0);
|
||||
}
|
||||
} 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
|
||||
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"));
|
||||
} else {
|
||||
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"));
|
||||
} else {
|
||||
me.Brakes.rightPressPsi.setValue(0);
|
||||
|
@ -164,12 +150,12 @@ var HYD = {
|
|||
} else {
|
||||
# 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.Brakes.lbrake.getValue() > 0) {
|
||||
if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
me.Brakes.leftPressPsi.setValue(1000);
|
||||
} else {
|
||||
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);
|
||||
} else {
|
||||
me.Brakes.rightPressPsi.setValue(0);
|
||||
|
@ -177,12 +163,12 @@ var HYD = {
|
|||
} else {
|
||||
# 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.Brakes.lbrake.getValue() > 0) {
|
||||
if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) {
|
||||
me.Brakes.leftPressPsi.setValue(me.Brakes.accumPressPsi.getValue());
|
||||
} else {
|
||||
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());
|
||||
} else {
|
||||
me.Brakes.rightPressPsi.setValue(0);
|
||||
|
|
|
@ -30,23 +30,7 @@ var execLoop = func
|
|||
emesary.GlobalTransmitter.NotifyAll(notifications.frameNotification);
|
||||
|
||||
notifications.frameNotification.FrameCount = notifications.frameNotification.FrameCount + 1;
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
frame_inc = 0.0333; #30 Hz
|
||||
if (frame_inc != cur_frame_inc) {
|
||||
cur_frame_inc = frame_inc;
|
||||
}
|
||||
|
|
|
@ -94,8 +94,14 @@
|
|||
<switch name="hydraulics/aileron-l/pressure-switch-or">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
<test logic="AND">
|
||||
/systems/fctl/elac1 eq 1
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
</test>
|
||||
<test logic="AND">
|
||||
/systems/fctl/elac2 eq 1
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -167,8 +173,14 @@
|
|||
<switch name="hydraulics/aileron-r/pressure-switch-or">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
<test logic="AND">
|
||||
/systems/fctl/elac1 eq 1
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
</test>
|
||||
<test logic="AND">
|
||||
/systems/fctl/elac2 eq 1
|
||||
/systems/hydraulic/blue-psi ge 1500
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -229,16 +241,42 @@
|
|||
<switch name="hydraulics/elevator-l/pressure-switch-or">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
/systems/hydraulic/blue-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
|
||||
</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 name="hydraulics/elevator-l/switch">
|
||||
<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">
|
||||
hydraulics/elevator-l/pressure-switch-or eq 1
|
||||
/systems/failures/elevator-left eq 0
|
||||
/it-fbw/law ne 3
|
||||
</test>
|
||||
<clipto>
|
||||
<min>-1.0</min>
|
||||
|
@ -269,16 +307,42 @@
|
|||
<switch name="hydraulics/elevator-r/pressure-switch-or">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/systems/hydraulic/blue-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
|
||||
</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 name="hydraulics/elevator-r/switch">
|
||||
<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">
|
||||
hydraulics/elevator-r/pressure-switch-or eq 1
|
||||
/systems/failures/elevator-right eq 0
|
||||
/it-fbw/law ne 3
|
||||
</test>
|
||||
<clipto>
|
||||
<min>-1.0</min>
|
||||
|
@ -307,7 +371,10 @@
|
|||
<channel name="Pitch Trim">
|
||||
|
||||
<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">
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
|
|
|
@ -2025,7 +2025,7 @@
|
|||
</channel>
|
||||
|
||||
<channel name="FCTL" execrate="8">
|
||||
|
||||
|
||||
<switch name="/ECAM/warnings/fctl/lrElevFault">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
|
@ -2048,6 +2048,117 @@
|
|||
<rate_limit sense="incr">3.33333333333</rate_limit> <!-- 0.3 seconds -->
|
||||
</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">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
<property>/it-autoflight/internal/alt</property>
|
||||
</input>
|
||||
<reference>
|
||||
<property>/position/gear-agl-ft</property>
|
||||
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
|
||||
</reference>
|
||||
<output>/instrumentation/pfd/alt-diff</output>
|
||||
</filter>
|
||||
|
|
Loading…
Reference in a new issue