Merge branch 'ECAM3'

This commit is contained in:
legoboyvdlp R 2019-07-31 16:37:30 +01:00
commit c6bf6746e1
59 changed files with 3071 additions and 670 deletions

View file

@ -138,6 +138,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-fcs"/>
<system file="a320-spoiler"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<flight_control name="none"/>

View file

@ -138,6 +138,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-fcs"/>
<system file="a320-spoiler"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<flight_control name="none"/>

View file

@ -138,6 +138,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-fcs"/>
<system file="a320-spoiler"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<flight_control name="none"/>
<aerodynamics file="Systems/a320-aerodynamics.xml"/>

View file

@ -94,6 +94,17 @@
<output-property>/systems/pitot/icing</output-property>
</iceable>
</icing>
<flame>
<red-high type="double">1.0</red-high>
<red-low type="double">0.95</red-low>
<red-base type="double">1.0</red-base>
<green-high type="double">0.741</green-high>
<green-low type="double">0.32</green-low>
<green-base type="double">0.741</green-base>
<blue-high type="double">0.10</blue-high>
<blue-low type="double">0.02</blue-low>
<blue-base type="double">0.09</blue-base>
</flame>
</model>
<startup>
@ -636,6 +647,11 @@
<throttle-fdm type="double">0</throttle-fdm>
</engine>
</engines>
<fire>
<apu-test-btn type="bool">0</apu-test-btn>
<test-btn-1 type="bool">0</test-btn-1>
<test-btn-2 type="bool">0</test-btn-2>
</fire>
<flight>
<aileron-drives-tiller type="bool">0</aileron-drives-tiller>
<aileron-input>0</aileron-input>
@ -794,6 +810,9 @@
<transponder-code type="string">2000</transponder-code>
<failed type="bool">0</failed>
</atc>
<apu n="0">
<emer-shutdown type="bool">false</emer-shutdown>
</apu>
<electrical n="0">
<bus n="0">
<dc-ess>0</dc-ess>
@ -817,11 +836,36 @@
<spoiler-r3 type="bool">0</spoiler-r3>
<spoiler-r4 type="bool">0</spoiler-r4>
<spoiler-r5 type="bool">0</spoiler-r5>
<engine-left-fire type="bool">0</engine-left-fire>
<engine-right-fire type="bool">0</engine-right-fire>
<apu-fire type="bool">0</apu-fire>
<cargo-fwd-fire type="bool">0</cargo-fwd-fire>
<cargo-aft-fire type="bool">0</cargo-aft-fire>
</failures>
<fctl n="0">
<fac1 type="bool">0</fac1>
<fac2 type="bool">0</fac2>
</fctl>
<fire n="0">
<apu>
<temperature type="double">0</temperature>
</apu>
<engine1>
<temperature type="double">0</temperature>
</engine1>
<engine2>
<temperature type="double">0</temperature>
</engine2>
<cargo>
<disch type="bool">0</disch>
<aft>
<temperature type="double">0</temperature>
</aft>
<fwd>
<temperature type="double">0</temperature>
</fwd>
</cargo>
</fire>
<fuel n="0">
<only-use-ctr-tank type="bool">0</only-use-ctr-tank>
<tank n="0">

View file

@ -138,6 +138,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-fcs"/>
<system file="a320-spoiler"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<flight_control name="none"/>

View file

@ -138,6 +138,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-fcs"/>
<system file="a320-spoiler"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<flight_control name="none"/>

View file

@ -73,6 +73,8 @@ var failReset = func {
setprop("/systems/failures/fuelmode", 0);
setprop("/systems/failures/cargo-aft-fire", 0);
setprop("/systems/failures/cargo-fwd-fire", 0);
setprop("/systems/failures/engine-left-fire", 0);
setprop("/systems/failures/engine-right-fire", 0);
}
failReset();

View file

@ -487,6 +487,49 @@
</binding>
<live>true</live>
</checkbox>
<group>
<layout>hbox</layout>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>Engine Fire</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<checkbox>
<label>Left Engine</label>
<halign>left</halign>
<property>/systems/failures/engine-left-fire</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>APU</label>
<halign>left</halign>
<property>/systems/failures/apu-fire</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Right Engine</label>
<halign>left</halign>
<property>/systems/failures/engine-right-fire</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<hrule/>
@ -502,9 +545,7 @@
</script>
</binding>
</button>
</group>
</group>
</PropertyList>

Binary file not shown.

View file

@ -404,5 +404,4 @@
</and>
</condition>
</animation>
</PropertyList>

View file

@ -434,5 +434,4 @@
</and>
</condition>
</animation>
</PropertyList>

View file

@ -433,5 +433,4 @@
</and>
</condition>
</animation>
</PropertyList>

View file

@ -414,5 +414,4 @@
</and>
</condition>
</animation>
</PropertyList>

View file

@ -420,5 +420,4 @@
</and>
</condition>
</animation>
</PropertyList>

View file

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<PropertyList>
<path>Aircraft/Generic/Effects/Thruster/thrust_flame.ac</path>
<nopreview/>
<animation>
<type>scale</type>
<property>systems/failures/apu-fire</property>
<x-min>0.2</x-min>
<y-min>0.3</y-min>
<z-min>0.3</z-min>
<y-max>0.8</y-max>
<z-max>0.8</z-max>
<x-factor>0.2</x-factor>
<y-factor>0.2</y-factor>
<z-factor>0.2</z-factor>
</animation>
<animation>
<type>select</type>
<object-name>Bounding_box</object-name>
<condition>
<greater-than>
<property>systems/failures/apu-fire</property>
<value>0.8</value>
</greater-than>
</condition>
</animation>
<effect>
<inherits-from>Aircraft/IDG-A32X/Models/Effects/flame-apu</inherits-from>
<object-name>Bounding_box</object-name>
</effect>
</PropertyList>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>AB-flame</name>
<inherits-from>Effects/thrust-flame</inherits-from>
<parameters>
<base_flame_b type="float"><use>/sim/model/flame/blue-base</use></base_flame_b>
<base_flame_density type="float">0.01</base_flame_density>
<base_flame_g type="float"><use>/sim/model/flame/green-base</use></base_flame_g>
<base_flame_r type="float"><use>/sim/model/flame/red-base</use></base_flame_r>
<deflection_coeff type="float">0</deflection_coeff>
<flame_color_high_b type="float"><use>/sim/model/flame/blue-high</use></flame_color_high_b>
<flame_color_high_g type="float"><use>/sim/model/flame/green-high</use></flame_color_high_g>
<flame_color_high_r type="float"><use>/sim/model/flame/red-high</use></flame_color_high_r>
<flame_color_low_b type="float"><use>/sim/model/flame/blue-low</use></flame_color_low_b>
<flame_color_low_g type="float"><use>/sim/model/flame/green-low</use></flame_color_low_g>
<flame_color_low_r type="float"><use>/sim/model/flame/red-low</use></flame_color_low_r>
<flame_radius_fraction type="float">0.7</flame_radius_fraction>
<noise_scale type="float">0.8</noise_scale>
<noise_strength type="float">0.4</noise_strength>
<thrust_collimation type="float">0.2</thrust_collimation>
<thrust_density type="float">0.8</thrust_density>
<use_noise type="int">1</use_noise>
<use_shocks type="int">0</use_shocks>
</parameters>
</PropertyList>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>AB-flame</name>
<inherits-from>Effects/thrust-flame</inherits-from>
<parameters>
<base_flame_b type="float"><use>/sim/model/flame/blue-base</use></base_flame_b>
<base_flame_density type="float">0.01</base_flame_density>
<base_flame_g type="float"><use>/sim/model/flame/green-base</use></base_flame_g>
<base_flame_r type="float"><use>/sim/model/flame/red-base</use></base_flame_r>
<deflection_coeff type="float">0</deflection_coeff>
<flame_color_high_b type="float"><use>/sim/model/flame/blue-high</use></flame_color_high_b>
<flame_color_high_g type="float"><use>/sim/model/flame/green-high</use></flame_color_high_g>
<flame_color_high_r type="float"><use>/sim/model/flame/red-high</use></flame_color_high_r>
<flame_color_low_b type="float"><use>/sim/model/flame/blue-low</use></flame_color_low_b>
<flame_color_low_g type="float"><use>/sim/model/flame/green-low</use></flame_color_low_g>
<flame_color_low_r type="float"><use>/sim/model/flame/red-low</use></flame_color_low_r>
<flame_radius_fraction type="float">0.4</flame_radius_fraction>
<noise_scale type="float">0.8</noise_scale>
<noise_strength type="float">0.2</noise_strength>
<thrust_collimation type="float">0.5</thrust_collimation>
<thrust_density type="float">0.8</thrust_density>
<use_noise type="int">1</use_noise>
<use_shocks type="int">0</use_shocks>
</parameters>
</PropertyList>

25
Models/Effects/flame.eff Normal file
View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>AB-flame</name>
<inherits-from>Effects/thrust-flame</inherits-from>
<parameters>
<base_flame_b type="float"><use>/sim/model/flame/blue-base</use></base_flame_b>
<base_flame_density type="float">0.01</base_flame_density>
<base_flame_g type="float"><use>/sim/model/flame/green-base</use></base_flame_g>
<base_flame_r type="float"><use>/sim/model/flame/red-base</use></base_flame_r>
<deflection_coeff type="float">0</deflection_coeff>
<flame_color_high_b type="float"><use>/sim/model/flame/blue-high</use></flame_color_high_b>
<flame_color_high_g type="float"><use>/sim/model/flame/green-high</use></flame_color_high_g>
<flame_color_high_r type="float"><use>/sim/model/flame/red-high</use></flame_color_high_r>
<flame_color_low_b type="float"><use>/sim/model/flame/blue-low</use></flame_color_low_b>
<flame_color_low_g type="float"><use>/sim/model/flame/green-low</use></flame_color_low_g>
<flame_color_low_r type="float"><use>/sim/model/flame/red-low</use></flame_color_low_r>
<flame_radius_fraction type="float">0.82</flame_radius_fraction>
<noise_scale type="float">0.8</noise_scale>
<noise_strength type="float">0.2</noise_strength>
<thrust_collimation type="float">0.2</thrust_collimation>
<thrust_density type="float">0.8</thrust_density>
<use_noise type="int">1</use_noise>
<use_shocks type="int">0</use_shocks>
</parameters>
</PropertyList>

View file

@ -8,7 +8,7 @@
<params>
<n1>engines/engine[3]/n1</n1>
<on-fire>engines/engine[0]/on-fire</on-fire>
<on-fire>systems/failures/engine-left-fire</on-fire>
<contrail>engines/engine[0]/contrail</contrail>
<reverser-pos-norm>sim/multiplay/generic/float[2]</reverser-pos-norm>
</params>

View file

@ -8,7 +8,7 @@
<params>
<n1>engines/engine[4]/n1</n1>
<on-fire>engines/engine[1]/on-fire</on-fire>
<on-fire>systems/failures/engine-right-fire</on-fire>
<contrail>engines/engine[1]/contrail</contrail>
<reverser-pos-norm>sim/multiplay/generic/float[3]</reverser-pos-norm>
</params>

View file

@ -13,7 +13,7 @@
<params>
<n1>engines/engine[3]/n1</n1>
<on-fire>engines/engine[0]/on-fire</on-fire>
<on-fire>systems/failures/engine-left-fire</on-fire>
<contrail>engines/engine[0]/contrail</contrail>
<reverser-pos-norm>sim/multiplay/generic/float[2]</reverser-pos-norm>
</params>

View file

@ -13,7 +13,7 @@
<params>
<n1>engines/engine[4]/n1</n1>
<on-fire>engines/engine[1]/on-fire</on-fire>
<on-fire>systems/failures/engine-right-fire</on-fire>
<contrail>engines/engine[1]/contrail</contrail>
<reverser-pos-norm>sim/multiplay/generic/float[3]</reverser-pos-norm>
</params>

View file

@ -10,7 +10,7 @@
<params>
<n1>engines/engine[3]/n1</n1>
<on-fire>engines/engine[0]/on-fire</on-fire>
<on-fire>systems/failures/engine-left-fire</on-fire>
<contrail>engines/engine[0]/contrail</contrail>
<reverser-pos-norm>sim/multiplay/generic/float[2]</reverser-pos-norm>
<pylon-model-path>Aircraft/IDG-A32X/Models/Engines/XMLs/a320.pylon.cfm.left.xml</pylon-model-path>

View file

@ -10,7 +10,7 @@
<params>
<n1>engines/engine[4]/n1</n1>
<on-fire>engines/engine[1]/on-fire</on-fire>
<on-fire>systems/failures/engine-right-fire</on-fire>
<contrail>engines/engine[1]/contrail</contrail>
<reverser-pos-norm>sim/multiplay/generic/float[3]</reverser-pos-norm>
<pylon-model-path>Aircraft/IDG-A32X/Models/Engines/XMLs/a320.pylon.cfm.right.xml</pylon-model-path>

View file

@ -10,7 +10,7 @@
<params>
<n1>engines/engine[3]/n1</n1>
<on-fire>engines/engine[0]/on-fire</on-fire>
<on-fire>systems/failures/engine-left-fire</on-fire>
<contrail>engines/engine[0]/contrail</contrail>
<reverser-pos-norm>sim/multiplay/generic/float[2]</reverser-pos-norm>
<pylon-model-path>Aircraft/IDG-A32X/Models/Engines/XMLs/a320.pylon.iae.left.xml</pylon-model-path>

View file

@ -10,7 +10,7 @@
<params>
<n1>engines/engine[4]/n1</n1>
<on-fire>engines/engine[1]/on-fire</on-fire>
<on-fire>systems/failures/engine-right-fire</on-fire>
<contrail>engines/engine[1]/contrail</contrail>
<reverser-pos-norm>sim/multiplay/generic/float[3]</reverser-pos-norm>
<pylon-model-path>Aircraft/IDG-A32X/Models/Engines/XMLs/a320.pylon.iae.right.xml</pylon-model-path>

View file

@ -5168,6 +5168,17 @@
<property>ECAM/warnings/master-warning-light</property>
<value>0</value>
</binding>
<binding>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>sim/sound/warnings/crc</property>
<value>0</value>
</binding>
<binding>
<condition>
<greater-than-equals>
@ -5218,10 +5229,6 @@
if (getprop("/it-autoflight/output/athr-warning") == 1) {
setprop("/it-autoflight/output/athr-warning", 0);
}
if (getprop("/sim/sound/warnings/chime") == 1) {
setprop("/sim/sound/warnings/chime", 0);
}
</script>
</binding>
</action>

View file

@ -32,7 +32,7 @@
<z-m>0.95</z-m>
</offsets>
<condition>
<property>engines/apu/on-fire</property>
<property>systems/failures/apu-fire</property>
</condition>
</model>

View file

@ -32,7 +32,7 @@
<z-m>0.95</z-m>
</offsets>
<condition>
<property>engines/apu/on-fire</property>
<property>systems/failures/apu-fire</property>
</condition>
</model>

View file

@ -32,7 +32,7 @@
<z-m>0.95</z-m>
</offsets>
<condition>
<property>engines/apu/on-fire</property>
<property>systems/failures/apu-fire</property>
</condition>
</model>

File diff suppressed because it is too large Load diff

View file

@ -122,6 +122,85 @@
<object-name>vu112_dfdr</object-name>
</effect>
<animation>
<type>select</type>
<object-name>engine_fire_1</object-name>
<condition>
<property>systems/fire/engine1/warning-active</property>
</condition>
</animation>
<animation>
<type>material</type>
<object-name>engine_fire_1</object-name>
<condition>
<property>systems/fire/engine1/warning-active</property>
</condition>
<emission>
<red>1.0</red>
<green>1.0</green>
<blue>1.0</blue>
</emission>
</animation>
<animation>
<type>select</type>
<object-name>engine_fault_1</object-name>
<condition>
<property>systems/unused/unused-ped</property>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>engine_fire_1</object-name>
<condition>
<property>systems/fire/engine1/warning-active</property>
</condition>
</animation>
<animation>
<type>material</type>
<object-name>engine_fire_1</object-name>
<condition>
<property>systems/fire/engine1/warning-active</property>
</condition>
<emission>
<red>1.0</red>
<green>1.0</green>
<blue>1.0</blue>
</emission>
</animation>
<animation>
<type>select</type>
<object-name>engine_fault_2</object-name>
<condition>
<property>systems/unused/unused-ped</property>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>engine_fire_2</object-name>
<condition>
<property>systems/fire/engine2/warning-active</property>
</condition>
</animation>
<animation>
<type>material</type>
<object-name>engine_fire_2</object-name>
<condition>
<property>systems/fire/engine2/warning-active</property>
</condition>
<emission>
<red>1.0</red>
<green>1.0</green>
<blue>1.0</blue>
</emission>
</animation>
<effect>
<inherits-from>Aircraft/IDG-A32X/Models/Effects/cockpit-irradiance</inherits-from>
<object-name>atc_0</object-name>

View file

@ -107,6 +107,25 @@ var canvas_upperECAM_base = {
me[key] = canvas_group.getElementById(key);
}
# set font
me["ECAML1"].setFont("LiberationMonoCustom.ttf");
me["ECAML2"].setFont("LiberationMonoCustom.ttf");
me["ECAML3"].setFont("LiberationMonoCustom.ttf");
me["ECAML4"].setFont("LiberationMonoCustom.ttf");
me["ECAML5"].setFont("LiberationMonoCustom.ttf");
me["ECAML6"].setFont("LiberationMonoCustom.ttf");
me["ECAML7"].setFont("LiberationMonoCustom.ttf");
me["ECAML8"].setFont("LiberationMonoCustom.ttf");
me["ECAMR1"].setFont("LiberationMonoCustom.ttf");
me["ECAMR2"].setFont("LiberationMonoCustom.ttf");
me["ECAMR3"].setFont("LiberationMonoCustom.ttf");
me["ECAMR4"].setFont("LiberationMonoCustom.ttf");
me["ECAMR5"].setFont("LiberationMonoCustom.ttf");
me["ECAMR6"].setFont("LiberationMonoCustom.ttf");
me["ECAMR7"].setFont("LiberationMonoCustom.ttf");
me["ECAMR8"].setFont("LiberationMonoCustom.ttf");
me.page = canvas_group;
return me;

View file

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<PropertyList>
<path>Aircraft/Generic/Effects/Thruster/thrust_flame.ac</path>
<nopreview/>
<animation>
<type>scale</type>
<property>systems/failures/engine-left-fire</property>
<x-min>0.2</x-min>
<y-min>0.3</y-min>
<z-min>0.3</z-min>
<y-max>0.8</y-max>
<z-max>0.8</z-max>
<x-factor>0.4</x-factor>
<y-factor>0.35</y-factor>
<z-factor>0.35</z-factor>
</animation>
<animation>
<type>select</type>
<object-name>Bounding_box</object-name>
<condition>
<property>systems/failures/engine-left-fire</property>
</condition>
</animation>
<effect>
<inherits-from>Aircraft/IDG-A32X/Models/Effects/flame-cfm</inherits-from>
<object-name>Bounding_box</object-name>
</effect>
</PropertyList>

View file

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<PropertyList>
<path>Aircraft/Generic/Effects/Thruster/thrust_flame.ac</path>
<nopreview/>
<animation>
<type>scale</type>
<property>systems/failures/engine-left-fire</property>
<x-min>0.2</x-min>
<y-min>0.3</y-min>
<z-min>0.3</z-min>
<y-max>0.8</y-max>
<z-max>0.8</z-max>
<x-factor>0.4</x-factor>
<y-factor>0.7</y-factor>
<z-factor>0.7</z-factor>
</animation>
<animation>
<type>select</type>
<object-name>Bounding_box</object-name>
<condition>
<property>systems/failures/engine-left-fire</property>
</condition>
</animation>
<effect>
<inherits-from>Aircraft/IDG-A32X/Models/Effects/flame</inherits-from>
<object-name>Bounding_box</object-name>
</effect>
</PropertyList>

View file

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<PropertyList>
<path>Aircraft/Generic/Effects/Thruster/thrust_flame.ac</path>
<nopreview/>
<animation>
<type>scale</type>
<property>systems/failures/engine-right-fire</property>
<x-min>0.2</x-min>
<y-min>0.3</y-min>
<z-min>0.3</z-min>
<y-max>0.8</y-max>
<z-max>0.8</z-max>
<x-factor>0.4</x-factor>
<y-factor>0.35</y-factor>
<z-factor>0.35</z-factor>
</animation>
<animation>
<type>select</type>
<object-name>Bounding_box</object-name>
<condition>
<property>systems/failures/engine-right-fire</property>
</condition>
</animation>
<effect>
<inherits-from>Aircraft/IDG-A32X/Models/Effects/flame-cfm</inherits-from>
<object-name>Bounding_box</object-name>
</effect>
</PropertyList>

View file

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<PropertyList>
<path>Aircraft/Generic/Effects/Thruster/thrust_flame.ac</path>
<nopreview/>
<animation>
<type>scale</type>
<property>systems/failures/engine-right-fire</property>
<x-min>0.2</x-min>
<y-min>0.3</y-min>
<z-min>0.3</z-min>
<y-max>0.8</y-max>
<z-max>0.8</z-max>
<x-factor>0.4</x-factor>
<y-factor>0.7</y-factor>
<z-factor>0.7</z-factor>
</animation>
<animation>
<type>select</type>
<object-name>Bounding_box</object-name>
<condition>
<property>systems/failures/engine-right-fire</property>
</condition>
</animation>
<effect>
<inherits-from>Aircraft/IDG-A32X/Models/Effects/flame</inherits-from>
<object-name>Bounding_box</object-name>
</effect>
</PropertyList>

View file

@ -301,7 +301,6 @@ var LowerECAM = {
setprop("/it-autoflight/output/athr-warning", 0);
setprop("/ECAM/Lower/light/clr", 0);
setprop("/ECAM/warnings/master-caution-light", 0);
LowerECAM.failCall("sts");
return;
}
@ -309,12 +308,12 @@ var LowerECAM = {
setprop("/it-autoflight/output/ap-warning", 0);
setprop("/ECAM/Lower/light/clr", 0);
setprop("/ECAM/warnings/master-warning-light", 0);
LowerECAM.failCall("sts");
return;
}
if (b == "clr" and getprop("/ECAM/Lower/man-select") == 0 and getprop("/ECAM/Lower/fault-select") == 0) {
ecam.ECAM_controller.clear();
return;
}
if (getprop("/ECAM/Lower/fault-select") == 0) {

View file

@ -25,17 +25,26 @@ var lineIndex = 0;
var rightLineIndex = 0;
var statusIndex = 0;
var flash = 0;
var hasCleared = 0;
var statusFlag = 0;
var warning = {
new: func(msg,colour,aural,light) {
new: func(msg,colour = "g",aural = 9,light = 9,hasSubmsg = 0,lastSubmsg = 0, sdPage = "nil") {
var t = {parents:[warning]};
t.msg = msg;
t.active = 0;
t.colour = colour;
t.aural = aural;
t.light = light;
t.hasSubmsg = hasSubmsg;
t.lastSubmsg = lastSubmsg;
t.active = 0;
t.noRepeat = 0;
t.noRepeat2 = 0;
t.clearFlag = 0;
t.sdPage = sdPage;
t.hasCalled = 0;
return t
},
@ -58,29 +67,34 @@ var warning = {
}
},
warnlight: func() {
if (me.light >= 1) {return;}
if (me.active == 1 and me.noRepeat == 0) { # only toggle light once per message, allows canceling
if (me.light > 1 or me.noRepeat == 1 or me.active == 0) {return;}
lights[me.light].setBoolValue(1);
me.noRepeat = 1;
}
},
sound: func() {
if (me.aural > 1) {return;}
if (me.active == 1) {
if (!aural[me.aural].getBoolValue()) {
if (me.aural > 1 or me.noRepeat2 == 1 or me.active == 0) {return;}
if (me.aural != 0) {
aural[me.aural].setBoolValue(0);
}
me.noRepeat2 = 1;
settimer(func() {
aural[me.aural].setBoolValue(1);
}
}
}, 0.15);
},
callPage: func() {
if (me.sdPage == "nil" or me.hasCalled == 1) { return; }
#libraries.LowerECAM.failCall(me.sdPage);
me.hasCalled = 1;
}
};
var memo = {
new: func(msg,colour) {
new: func(msg,colour = "g") {
var t = {parents:[memo]};
t.msg = msg;
t.active = 0;
t.colour = colour;
t.active = 0;
return t
},
@ -110,8 +124,8 @@ var status = {
var t = {parents:[status]};
t.msg = msg;
t.active = 0;
t.colour = colour;
t.active = 0;
return t
},
@ -156,14 +170,19 @@ var ECAM_controller = {
}
# write to ECAM
var counter = 0;
foreach (var w; warnings.vector) {
if (counter >= 9) { break; }
if (w.active == 1) {
w.write();
w.warnlight();
w.sound();
counter += 1;
}
}
if (lines[0].getValue() == "") { # disable left memos if a warning exists. Warnings are processed first, so this stops leftmemos if line1 is not empty
if (lines[0].getValue() == "" and flash == 0) { # disable left memos if a warning exists. Warnings are processed first, so this stops leftmemos if line1 is not empty
foreach (var l; leftmemos.vector) {
l.write();
}
@ -219,13 +238,21 @@ var ECAM_controller = {
}
},
clear: func() {
hasCleared = 0;
foreach (var w; warnings.vector) {
if (w.active == 1) {
# if (w.msg == "ENG DUAL FAILURE") { continue; }
if (w.hasSubmsg == 1) { continue; }
w.clearFlag = 1;
hasCleared = 1;
statusFlag = 1;
break;
}
}
if (hasCleared == 0 and statusFlag == 1) {
libraries.LowerECAM.failCall("sts");
statusFlag = 0;
}
},
recall: func() {
foreach (var w; warnings.vector) {
@ -236,6 +263,11 @@ var ECAM_controller = {
}
}
},
warningReset: func(warning) {
warning.active = 0;
warning.noRepeat = 0;
warning.noRepeat2 = 0;
},
};
setlistener("/systems/electrical/bus/dc-ess", func {
@ -244,11 +276,15 @@ setlistener("/systems/electrical/bus/dc-ess", func {
}
}, 0, 0);
var ECAMloopTimer = maketimer(0.2, func {
var ECAMloopTimer = maketimer(0.15, func {
ECAM_controller.loop();
});
# Flash Master Warning Light
var shutUpYou = func() {
lights[0].setBoolValue(0);
}
var warnTimer = maketimer(0.25, func {
if (!lights[0].getBoolValue()) {
warnTimer.stop();

View file

@ -12,7 +12,17 @@ var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1
var emerGen = props.globals.getNode("/controls/electrical/switches/emer-gen", 1);
var fac1Node = props.globals.getNode("/controls/fctl/fac1", 1);
var state1Node = props.globals.getNode("/engines/engine[0]/state", 1);
var state2Node = props.globals.getNode("/engines/engine[1]/state", 1);
var wowNode = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
var apu_rpm = props.globals.getNode("/systems/apu/rpm", 1);
var wing_pb = props.globals.getNode("/controls/switches/wing", 1);
var apumaster = props.globals.getNode("/controls/APU/master", 1);
var apu_bleedSw = props.globals.getNode("/controls/pneumatic/switches/bleedapu", 1);
var gear = props.globals.getNode("/gear/gear-pos-norm", 1);
var cutoff1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
var cutoff2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
var engOpt = props.globals.getNode("/options/eng", 1);
# local variables
var phaseVar = nil;
var dualFailFACActive = 1;
@ -24,19 +34,15 @@ var messages_priority_3 = func {
if ((flap_not_zero.clearFlag == 0) and phaseVar == 6 and getprop("/controls/flight/flap-lever") != 0 and getprop("/instrumentation/altimeter/indicated-altitude-ft") > 22000) {
flap_not_zero.active = 1;
} else {
flap_not_zero.active = 0;
flap_not_zero.noRepeat = 0;
flap_not_zero.clearFlag = 0;
ECAM_controller.warningReset(flap_not_zero);
}
# ENG DUAL FAIL
if (phaseVar >= 5 and phaseVar <= 7 and dualFailNode.getBoolValue()) {
dualFail.active = 1;
} elsif (dualFail.clearFlag == 1) {
dualFail.active = 0;
dualFail.noRepeat = 0;
dualFail.clearFlag = 0;
} elsif (dualFailbatt.clearFlag == 1 or !dualFailNode.getBoolValue()) {
ECAM_controller.warningReset(dualFail);
dualFailFACActive = 1; # reset FAC local variable
}
@ -45,116 +51,594 @@ var messages_priority_3 = func {
if (getprop("/controls/engines/engine-start-switch") != 2 and dualFailModeSel.clearFlag == 0) {
dualFailModeSel.active = 1;
} else {
dualFailModeSel.active = 0;
ECAM_controller.warningReset(dualFailModeSel);
}
if (getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01 and dualFailLevers.clearFlag == 0) {
dualFailLevers.active = 1;
} else {
dualFailLevers.active = 0;
ECAM_controller.warningReset(dualFailLevers);
}
if (getprop("/options/eng") == "IAE" and dualFailRelightSPD.clearFlag == 0) {
if (engOpt.getValue() == "IAE" and dualFailRelightSPD.clearFlag == 0) {
dualFailRelightSPD.active = 1;
} else {
dualFailRelightSPD.active = 0;
ECAM_controller.warningReset(dualFailRelightSPD);
}
if (getprop("/options/eng") != "IAE" and dualFailRelightSPDCFM.clearFlag == 0) {
if (engOpt.getValue() != "IAE" and dualFailRelightSPDCFM.clearFlag == 0) {
dualFailRelightSPDCFM.active = 1;
} else {
dualFailRelightSPDCFM.active = 0;
ECAM_controller.warningReset(dualFailRelightSPDCFM);
}
if (emerGen.getValue() == 0 and dualFailElec.clearFlag == 0) {
dualFailElec.active = 1;
} else {
dualFailElec.active = 0;
ECAM_controller.warningReset(dualFailElec);
}
if (dualFailRadio.clearFlag == 0) {
dualFailRadio.active = 1;
} else {
dualFailRadio.active = 0;
ECAM_controller.warningReset(dualFailRadio);
}
if (dualFailFACActive == 1 and dualFailFAC.clearFlag == 0) {
dualFailFAC.active = 1;
} else {
dualFailFAC.active = 0;
ECAM_controller.warningReset(dualFailFAC);
}
if (dualFailAPU.clearFlag == 0) { # assumption - not cleared till you clear APU message
dualFailRelight.active = 1;
if (dualFailMasters.clearFlag == 0) {
dualFailRelight.active = 1; # assumption
dualFailMasters.active = 1;
dualFailSuccess.active = 1;
} else {
ECAM_controller.warningReset(dualFailRelight);
ECAM_controller.warningReset(dualFailMasters);
}
if (dualFailSPDGD.clearFlag == 0) {
dualFailSuccess.active = 1; # assumption
dualFailSPDGD.active = 1;
} else {
ECAM_controller.warningReset(dualFailSuccess);
ECAM_controller.warningReset(dualFailSPDGD);
}
if (dualFailAPU.clearFlag == 0) {
dualFailAPU.active = 1;
} else {
dualFailRelight.active = 1;
dualFailMasters.active = 1;
dualFailSuccess.active = 1;
dualFailAPU.active = 1;
ECAM_controller.warningReset(dualFailAPU);
}
if (dualFailAPUwing.clearFlag == 0 and apu_rpm.getValue() > 94.9 and wing_pb.getBoolValue()) {
dualFailAPUwing.active = 1;
} else {
ECAM_controller.warningReset(dualFailAPUwing);
}
if (dualFailAPUbleed.clearFlag == 0 and apu_rpm.getValue() > 94.9 and !apu_bleedSw.getBoolValue()) {
dualFailAPUbleed.active = 1;
} else {
ECAM_controller.warningReset(dualFailAPUbleed);
}
if (dualFailMastersAPU.clearFlag == 0) {
dualFailMastersAPU.active = 1;
} else {
dualFailMastersAPU.active = 0;
}
if (dualFailSPDGD.clearFlag == 0) {
dualFailSPDGD.active = 1;
} else {
dualFailSPDGD.active = 0;
ECAM_controller.warningReset(dualFailMastersAPU);
}
if (dualFailflap.clearFlag == 0) {
dualFailAPPR.active = 1;
dualFailAPPR.active = 1; # assumption
dualFailflap.active = 1;
} else {
dualFailAPPR.active = 0;
ECAM_controller.warningReset(dualFailAPPR);
ECAM_controller.warningReset(dualFailflap);
}
if (dualFailcabin.clearFlag == 0) {
dualFailcabin.active = 1;
} else {
dualFailcabin.active = 0;
ECAM_controller.warningReset(dualFailcabin);
}
if (dualFailrudd.clearFlag == 0) {
dualFailrudd.active = 1;
} else {
dualFailrudd.active = 0;
ECAM_controller.warningReset(dualFailrudd);
}
if (dualFailflap.clearFlag == 0) {
dualFailflap.active = 1;
} else {
dualFailflap.active = 0;
}
if (dualFailfinalspeed.clearFlag == 0) {
dualFail5000.active = 1;
} else {
dualFail5000.active = 0;
}
if (dualFailgear.clearFlag == 0) {
if (dualFailgear.clearFlag == 0 and gear.getValue() != 1) {
dualFail5000.active = 1; # according to doc
dualFailgear.active = 1;
} else {
dualFailgear.active = 0;
ECAM_controller.warningReset(dualFailgear);
ECAM_controller.warningReset(dualFail5000);
}
if (dualFailfinalspeed.clearFlag == 0) {
dualFailfinalspeed.active = 1;
} else {
dualFailfinalspeed.active = 0;
ECAM_controller.warningReset(dualFailfinalspeed);
}
dualFailtouch.active = 1;
if (dualFailmasteroff.clearFlag == 0 and (!cutoff1.getBoolValue() or !cutoff2.getBoolValue())) {
dualFailmasteroff.active = 1;
} else {
ECAM_controller.warningReset(dualFailmasteroff);
}
if (dualFailapuoff.clearFlag == 0 and apumaster.getBoolValue()) {
dualFailapuoff.active = 1;
} else {
ECAM_controller.warningReset(dualFailapuoff);
}
if (dualFailevac.clearFlag == 0) {
dualFailevac.active = 1;
} else {
ECAM_controller.warningReset(dualFailevac);
}
if (dualFailbatt.clearFlag == 0) { # elec power lost when batt goes off anyway I guess
dualFailbatt.active = 1;
dualFailtouch.active = 1;
} else {
ECAM_controller.warningReset(dualFailbatt);
ECAM_controller.warningReset(dualFailtouch);
}
} else {
ECAM_controller.warningReset(dualFailModeSel);
ECAM_controller.warningReset(dualFailLevers);
ECAM_controller.warningReset(dualFailRelightSPD);
ECAM_controller.warningReset(dualFailRelightSPDCFM);
ECAM_controller.warningReset(dualFailElec);
ECAM_controller.warningReset(dualFailRadio);
ECAM_controller.warningReset(dualFailFAC);
ECAM_controller.warningReset(dualFailRelight);
ECAM_controller.warningReset(dualFailMasters);
ECAM_controller.warningReset(dualFailSuccess);
ECAM_controller.warningReset(dualFailSPDGD);
ECAM_controller.warningReset(dualFailAPU);
ECAM_controller.warningReset(dualFailAPUwing);
ECAM_controller.warningReset(dualFailAPUbleed);
ECAM_controller.warningReset(dualFailMastersAPU);
ECAM_controller.warningReset(dualFailAPPR);
ECAM_controller.warningReset(dualFailflap);
ECAM_controller.warningReset(dualFailcabin);
ECAM_controller.warningReset(dualFailrudd);
ECAM_controller.warningReset(dualFailgear);
ECAM_controller.warningReset(dualFail5000);
ECAM_controller.warningReset(dualFailfinalspeed);
ECAM_controller.warningReset(dualFailmasteroff);
ECAM_controller.warningReset(dualFailapuoff);
ECAM_controller.warningReset(dualFailevac);
ECAM_controller.warningReset(dualFailbatt);
ECAM_controller.warningReset(dualFailtouch);
}
# ENG FIRE
if ((eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and phaseVar >= 5 and phaseVar <= 7) or (eng1FireGnevacBat.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and (phaseVar < 5 or phaseVar > 7))) {
eng1Fire.active = 1;
} else {
ECAM_controller.warningReset(eng1Fire);
}
if ((eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and phaseVar >= 5 and phaseVar <= 7) or (eng2FireGnevacBat.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and (phaseVar < 5 or phaseVar > 7))) {
eng2Fire.active = 1;
} else {
ECAM_controller.warningReset(eng2Fire);
}
if (apuFireMaster.clearFlag == 0 and getprop("/systems/fire/apu/warning-active")) {
apuFire.active = 1;
} else {
ECAM_controller.warningReset(apuFire);
}
if (eng1Fire.active == 1) {
if (phaseVar >= 5 and phaseVar <= 7) {
if (eng1FireFllever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01) {
eng1FireFllever.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFllever);
}
if (eng1FireFlmaster.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
eng1FireFlmaster.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlmaster);
}
if (eng1FireFlPB.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 0) {
eng1FireFlPB.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlPB);
}
if (getprop("/systems/fire/engine1/agent1-timer") != 0 and getprop("/systems/fire/engine1/agent1-timer") != 99) {
eng1FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine1/agent1-timer") ~ " S...DISCH";
}
if (eng1FireFlAgent1.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 1 and !getprop("/systems/fire/engine1/disch1") and getprop("/systems/fire/engine1/agent1-timer") != 0 and getprop("/systems/fire/engine1/agent1-timer") != 99) {
eng1FireFlAgent1Timer.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlAgent1Timer);
}
if (eng1FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine1/disch1") and (getprop("/systems/fire/engine1/agent1-timer") == 0 or getprop("/systems/fire/engine1/agent1-timer") == 99)) {
eng1FireFlAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlAgent1);
}
if (eng1FireFlATC.clearFlag == 0) {
eng1FireFlATC.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlATC);
}
if (getprop("/systems/fire/engine1/agent2-timer") != 0 and getprop("/systems/fire/engine1/agent2-timer") != 99) {
eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine1/agent2-timer") ~ " S:";
}
if (eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/disch1") and !getprop("/systems/fire/engine1/disch2") and getprop("/systems/fire/engine1/agent2-timer") > 0) {
eng1FireFl30Sec.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFl30Sec);
}
if (eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/disch1") and !getprop("/systems/fire/engine1/disch2")) {
eng1FireFlAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng1FireFlAgent2);
}
} else {
ECAM_controller.warningReset(eng1FireFllever);
ECAM_controller.warningReset(eng1FireFlmaster);
ECAM_controller.warningReset(eng1FireFlPB);
ECAM_controller.warningReset(eng1FireFlAgent1);
ECAM_controller.warningReset(eng1FireFlATC);
ECAM_controller.warningReset(eng1FireFl30Sec);
ECAM_controller.warningReset(eng1FireFlAgent2);
}
if (phaseVar < 5 or phaseVar > 7) {
if (eng1FireGnlever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
eng1FireGnlever.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnlever);
}
if (eng1FireGnparkbrk.clearFlag == 0 and getprop("/controls/gear/brake-parking") == 0) {
eng1FireGnstopped.active = 1;
eng1FireGnparkbrk.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnstopped);
ECAM_controller.warningReset(eng1FireGnparkbrk);
}
if (eng1FireGnmaster.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
eng1FireGnmaster.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnmaster);
}
if (eng1FireGnPB.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 0) {
eng1FireGnPB.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnPB);
}
if (eng1FireGnAgent1.clearFlag == 0 and !getprop("/systems/fire/engine1/disch1")) {
eng1FireGnAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnAgent1);
}
if (eng1FireGnAgent2.clearFlag == 0 and !getprop("/systems/fire/engine1/disch2")) {
eng1FireGnAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnAgent2);
}
if (eng1FireGnmaster2.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
eng1FireGnmaster2.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnmaster2);
}
if (eng1FireGnATC.clearFlag == 0) {
eng1FireGnATC.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnATC);
}
if (eng1FireGncrew.clearFlag == 0) {
eng1FireGncrew.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGncrew);
}
if (eng1FireGnevacSw.clearFlag == 0) {
eng1FireGnevac.active = 1;
eng1FireGnevacSw.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnevac);
ECAM_controller.warningReset(eng1FireGnevacSw);
}
if (eng1FireGnevacApu.clearFlag == 0 and getprop("/controls/APU/master") and getprop("/systems/apu/rpm") > 99) {
eng1FireGnevacApu.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnevacApu);
}
if (eng1FireGnevacBat.clearFlag == 0 and (getprop("/controls/electrical/switches/battery1") or getprop("/controls/electrical/switches/battery2"))) {
eng1FireGnevacBat.active = 1;
} else {
ECAM_controller.warningReset(eng1FireGnevacBat);
}
} else {
ECAM_controller.warningReset(eng1FireGnlever);
ECAM_controller.warningReset(eng1FireGnstopped);
ECAM_controller.warningReset(eng1FireGnparkbrk);
ECAM_controller.warningReset(eng1FireGnmaster);
ECAM_controller.warningReset(eng1FireGnPB);
ECAM_controller.warningReset(eng1FireGnAgent1);
ECAM_controller.warningReset(eng1FireGnAgent2);
ECAM_controller.warningReset(eng1FireGnmaster2);
ECAM_controller.warningReset(eng1FireGnATC);
ECAM_controller.warningReset(eng1FireGncrew);
ECAM_controller.warningReset(eng1FireGnevac);
ECAM_controller.warningReset(eng1FireGnevacSw);
ECAM_controller.warningReset(eng1FireGnevacApu);
ECAM_controller.warningReset(eng1FireGnevacBat);
}
} else {
ECAM_controller.warningReset(eng1FireFllever);
ECAM_controller.warningReset(eng1FireFlmaster);
ECAM_controller.warningReset(eng1FireFlPB);
ECAM_controller.warningReset(eng1FireFlAgent1);
ECAM_controller.warningReset(eng1FireFlATC);
ECAM_controller.warningReset(eng1FireFl30Sec);
ECAM_controller.warningReset(eng1FireFlAgent2);
ECAM_controller.warningReset(eng1FireGnlever);
ECAM_controller.warningReset(eng1FireGnstopped);
ECAM_controller.warningReset(eng1FireGnparkbrk);
ECAM_controller.warningReset(eng1FireGnmaster);
ECAM_controller.warningReset(eng1FireGnPB);
ECAM_controller.warningReset(eng1FireGnAgent1);
ECAM_controller.warningReset(eng1FireGnAgent2);
ECAM_controller.warningReset(eng1FireGnmaster2);
ECAM_controller.warningReset(eng1FireGnATC);
ECAM_controller.warningReset(eng1FireGncrew);
ECAM_controller.warningReset(eng1FireGnevac);
ECAM_controller.warningReset(eng1FireGnevacSw);
ECAM_controller.warningReset(eng1FireGnevacApu);
ECAM_controller.warningReset(eng1FireGnevacBat);
}
if (eng2Fire.active == 1) {
if (phaseVar >= 5 and phaseVar <= 7) {
if (eng2FireFllever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
eng2FireFllever.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFllever);
}
if (eng2FireFlmaster.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
eng2FireFlmaster.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlmaster);
}
if (eng2FireFlPB.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 0) {
eng2FireFlPB.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlPB);
}
if (getprop("/systems/fire/engine2/agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) {
eng2FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine2/agent1-timer") ~ " S...DISCH";
}
if (eng2FireFlAgent1.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 1 and !getprop("/systems/fire/engine2/disch1") and getprop("/systems/fire/engine2agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) {
eng2FireFlAgent1Timer.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlAgent1Timer);
}
if (eng2FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1") and (getprop("/systems/fire/engine2/agent1-timer") == 0 or getprop("/systems/fire/engine2/agent1-timer") == 99)) {
eng2FireFlAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlAgent1);
}
if (eng2FireFlATC.clearFlag == 0) {
eng2FireFlATC.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlATC);
}
if (getprop("/systems/fire/engine2/agent2-timer") != 0 and getprop("/systems/fire/engine2/agent2-timer") != 99) {
eng2FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine2/agent2-timer") ~ " S:";
}
if (eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/disch1") and !getprop("/systems/fire/engine2/disch2") and getprop("/systems/fire/engine2/agent2-timer") > 0) {
eng2FireFl30Sec.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFl30Sec);
}
if (eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/disch1") and !getprop("/systems/fire/engine2/disch2")) {
eng2FireFlAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng2FireFlAgent2);
}
} else {
ECAM_controller.warningReset(eng2FireFllever);
ECAM_controller.warningReset(eng2FireFlmaster);
ECAM_controller.warningReset(eng2FireFlPB);
ECAM_controller.warningReset(eng2FireFlAgent1);
ECAM_controller.warningReset(eng2FireFlATC);
ECAM_controller.warningReset(eng2FireFl30Sec);
ECAM_controller.warningReset(eng2FireFlAgent2);
}
if (phaseVar < 5 or phaseVar > 7) {
if (eng2FireGnlever.clearFlag == 0 and getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01) {
eng2FireGnlever.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnlever);
}
if (eng2FireGnparkbrk.clearFlag == 0 and getprop("/controls/gear/brake-parking") == 0) {
eng2FireGnstopped.active = 1;
eng2FireGnparkbrk.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnstopped);
ECAM_controller.warningReset(eng2FireGnparkbrk);
}
if (eng2FireGnmaster.clearFlag == 0 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
eng2FireGnmaster.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnmaster);
}
if (eng2FireGnPB.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 0) {
eng2FireGnPB.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnPB);
}
if (eng2FireGnAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1")) {
eng2FireGnAgent1.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnAgent1);
}
if (eng2FireGnAgent2.clearFlag == 0 and !getprop("/systems/fire/engine2/disch2")) {
eng2FireGnAgent2.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnAgent2);
}
if (eng2FireGnmaster2.clearFlag == 0 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
eng2FireGnmaster2.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnmaster2);
}
if (eng2FireGnATC.clearFlag == 0) {
eng2FireGnATC.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnATC);
}
if (eng2FireGncrew.clearFlag == 0) {
eng2FireGncrew.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGncrew);
}
if (eng2FireGnevacSw.clearFlag == 0) {
eng2FireGnevac.active = 1;
eng2FireGnevacSw.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnevac);
ECAM_controller.warningReset(eng2FireGnevacSw);
}
if (eng2FireGnevacApu.clearFlag == 0 and getprop("/controls/APU/master") and getprop("/systems/apu/rpm") > 99) {
eng2FireGnevacApu.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnevacApu);
}
if (eng2FireGnevacBat.clearFlag == 0 and (getprop("/controls/electrical/switches/battery1") or getprop("/controls/electrical/switches/battery2"))) {
eng2FireGnevacBat.active = 1;
} else {
ECAM_controller.warningReset(eng2FireGnevacBat);
}
} else {
ECAM_controller.warningReset(eng2FireGnlever);
ECAM_controller.warningReset(eng2FireGnstopped);
ECAM_controller.warningReset(eng2FireGnparkbrk);
ECAM_controller.warningReset(eng2FireGnmaster);
ECAM_controller.warningReset(eng2FireGnPB);
ECAM_controller.warningReset(eng2FireGnAgent1);
ECAM_controller.warningReset(eng2FireGnAgent2);
ECAM_controller.warningReset(eng2FireGnmaster2);
ECAM_controller.warningReset(eng2FireGnATC);
ECAM_controller.warningReset(eng2FireGncrew);
ECAM_controller.warningReset(eng2FireGnevac);
ECAM_controller.warningReset(eng2FireGnevacSw);
ECAM_controller.warningReset(eng2FireGnevacApu);
ECAM_controller.warningReset(eng2FireGnevacBat);
}
} else {
ECAM_controller.warningReset(eng2FireFllever);
ECAM_controller.warningReset(eng2FireFlmaster);
ECAM_controller.warningReset(eng2FireFlPB);
ECAM_controller.warningReset(eng2FireFlAgent1);
ECAM_controller.warningReset(eng2FireFlATC);
ECAM_controller.warningReset(eng2FireFl30Sec);
ECAM_controller.warningReset(eng2FireFlAgent2);
ECAM_controller.warningReset(eng2FireGnlever);
ECAM_controller.warningReset(eng2FireGnstopped);
ECAM_controller.warningReset(eng2FireGnparkbrk);
ECAM_controller.warningReset(eng2FireGnmaster);
ECAM_controller.warningReset(eng2FireGnPB);
ECAM_controller.warningReset(eng2FireGnAgent1);
ECAM_controller.warningReset(eng2FireGnAgent2);
ECAM_controller.warningReset(eng2FireGnmaster2);
ECAM_controller.warningReset(eng2FireGnATC);
ECAM_controller.warningReset(eng2FireGncrew);
ECAM_controller.warningReset(eng2FireGnevac);
ECAM_controller.warningReset(eng2FireGnevacSw);
ECAM_controller.warningReset(eng2FireGnevacApu);
ECAM_controller.warningReset(eng2FireGnevacBat);
}
# APU Fire
if (apuFire.active == 1) {
if (apuFirePB.clearFlag == 0 and !getprop("/controls/APU/fire-btn")) {
apuFirePB.active = 1;
} else {
ECAM_controller.warningReset(apuFirePB);
}
if (getprop("/systems/fire/apu/agent-timer") != 0 and getprop("/systems/fire/apu/agent-timer") != 99) {
apuFireAgentTimer.msg = " -AGENT AFT " ~ getprop("/systems/fire/apu/agent-timer") ~ " S...DISCH";
}
if (apuFireAgent.clearFlag == 0 and getprop("/controls/APU/fire-btn") and !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") != 0) {
apuFireAgentTimer.active = 1;
} else {
ECAM_controller.warningReset(apuFireAgentTimer);
}
if (apuFireAgent.clearFlag == 0 and getprop("/controls/APU/fire-btn") and !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") == 0) {
apuFireAgent.active = 1;
} else {
ECAM_controller.warningReset(apuFireAgent);
}
if (apuFireMaster.clearFlag == 0 and getprop("/controls/APU/master")) {
apuFireMaster.active = 1;
} else {
ECAM_controller.warningReset(apuFireMaster);
}
} else {
ECAM_controller.warningReset(apuFirePB);
ECAM_controller.warningReset(apuFireAgentTimer);
ECAM_controller.warningReset(apuFireAgent);
ECAM_controller.warningReset(apuFireMaster);
}
# CONFIG
@ -162,99 +646,220 @@ var messages_priority_3 = func {
slats_config.active = 1;
slats_config_1.active = 1;
} else {
slats_config.active = 0;
slats_config.noRepeat = 0;
slats_config_1.active = 0;
slats_config_1.noRepeat = 0;
ECAM_controller.warningReset(slats_config);
ECAM_controller.warningReset(slats_config_1);
}
if ((flaps_config.clearFlag == 0) and (getprop("/controls/flight/flap-lever") == 0 or getprop("/controls/flight/flap-lever") == 4) and phaseVar >= 3 and phaseVar <= 4) {
flaps_config.active = 1;
flaps_config_1.active = 1;
} else {
flaps_config.active = 0;
flaps_config.noRepeat = 0;
flaps_config_1.active = 0;
flaps_config_1.noRepeat = 0;
ECAM_controller.warningReset(flaps_config);
ECAM_controller.warningReset(flaps_config_1);
}
if ((spd_brk_config.clearFlag == 0) and getprop("/controls/flight/speedbrake") != 0 and phaseVar >= 3 and phaseVar <= 4) {
spd_brk_config.active = 1;
spd_brk_config_1.active = 1;
} else {
spd_brk_config.active = 0;
spd_brk_config.noRepeat = 0;
spd_brk_config_1.active = 0;
spd_brk_config_1.noRepeat = 0;
ECAM_controller.warningReset(spd_brk_config);
ECAM_controller.warningReset(spd_brk_config_1);
}
if ((pitch_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65) and phaseVar >= 3 and phaseVar <= 4) {
pitch_trim_config.active = 1;
pitch_trim_config_1.active = 1;
} else {
pitch_trim_config.active = 0;
pitch_trim_config.noRepeat = 0;
pitch_trim_config_1.active = 0;
pitch_trim_config_1.noRepeat = 0;
ECAM_controller.warningReset(pitch_trim_config);
ECAM_controller.warningReset(pitch_trim_config_1);
}
if ((rud_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) and phaseVar >= 3 and phaseVar <= 4) {
rud_trim_config.active = 1;
rud_trim_config_1.active = 1;
} else {
rud_trim_config.active = 0;
rud_trim_config.noRepeat = 0;
rud_trim_config_1.active = 0;
rud_trim_config_1.noRepeat = 0;
ECAM_controller.warningReset(rud_trim_config);
ECAM_controller.warningReset(rud_trim_config_1);
}
if ((park_brk_config.clearFlag == 0) and getprop("/controls/gear/brake-parking") == 1 and phaseVar >= 3 and phaseVar <= 4) {
park_brk_config.active = 1;
} else {
park_brk_config.active = 0;
park_brk_config.noRepeat = 0;
ECAM_controller.warningReset(park_brk_config);
}
# AUTOFLT
if ((ap_offw.clearFlag == 0) and apWarn.getValue() == 2) {
ap_offw.active = 1;
} else {
ap_offw.active = 0;
ap_offw.noRepeat = 0;
ECAM_controller.warningReset(ap_offw);
if (getprop("/it-autoflight/output/ap-warning") == 2) {
setprop("/it-autoflight/output/ap-warning", 0);
setprop("/ECAM/Lower/light/clr", 0);
setprop("/ECAM/warnings/master-warning-light", 0);
}
}
if ((athr_lock.clearFlag == 0) and phaseVar >= 5 and phaseVar <= 7 and getprop("/systems/thrust/thr-locked") == 1) {
if ((athr_lock.clearFlag == 0) and phaseVar >= 5 and phaseVar <= 7 and getprop("/systems/thrust/thr-locked-alert") == 1) {
if (getprop("/systems/thrust/thr-locked-flash") == 0) {
athr_lock.msg = " ";
} else {
athr_lock.msg = msgSave
}
athr_lock.active = 1;
athr_lock_1.active = 1;
} else {
athr_lock.active = 0;
athr_lock_1.active = 0;
athr_lock.noRepeat = 0;
athr_lock_1.noRepeat = 0;
ECAM_controller.warningReset(athr_lock);
ECAM_controller.warningReset(athr_lock_1);
}
if ((athr_offw.clearFlag == 0) and athrWarn.getValue() == 2 and phaseVar != 4 and phaseVar != 8 and phaseVar != 10) {
athr_offw.active = 1;
athr_offw_1.active = 1;
} else {
athr_offw.active = 0;
athr_offw_1.active = 0;
athr_offw.noRepeat = 0;
athr_offw_1.noRepeat = 0;
ECAM_controller.warningReset(athr_offw);
ECAM_controller.warningReset(athr_offw_1);
if (getprop("/it-autoflight/output/athr-warning") == 2) {
setprop("/it-autoflight/output/athr-warning", 0);
setprop("/ECAM/Lower/light/clr", 0);
setprop("/ECAM/warnings/master-caution-light", 0);
}
}
if ((athr_lim.clearFlag == 0) and getprop("/it-autoflight/output/athr") == 1 and ((getprop("/systems/thrust/eng-out") != 1 and (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN")) or (getprop("/systems/thrust/eng-out") == 1 and (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN" or (getprop("/systems/thrust/state1") == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83) or (getprop("/systems/thrust/state2") == "MAN THR" and getprop("/controls/engines/engine[0]/throttle-pos") <= 0.83)))) and (phaseVar >= 5 and phaseVar <= 7)) {
athr_lim.active = 1;
athr_lim_1.active = 1;
} else {
athr_lim.active = 0;
athr_lim_1.active = 0;
athr_lim.noRepeat = 0;
athr_lim_1.noRepeat = 0;
ECAM_controller.warningReset(athr_lim);
ECAM_controller.warningReset(athr_lim_1);
}
if (!systems.cargoTestBtn.getBoolValue()) {
if (cargoSmokeFwd.clearFlag == 0 and systems.fwdCargoFireWarn.getBoolValue() and (getprop("/ECAM/warning-phase") <= 3 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") == 6)) {
cargoSmokeFwd.active = 1;
} elsif (cargoSmokeFwd.clearFlag == 1 or systems.cargoTestBtnOff.getBoolValue()) {
ECAM_controller.warningReset(cargoSmokeFwd);
cargoSmokeFwd.hasSubmsg = 1;
}
if (cargoSmokeFwdAgent.clearFlag == 0 and cargoSmokeFwd.active == 1 and !getprop("/systems/fire/cargo/disch")) {
cargoSmokeFwdAgent.active = 1;
} else {
ECAM_controller.warningReset(cargoSmokeFwdAgent);
cargoSmokeFwd.hasSubmsg = 0;
}
if (cargoSmokeAft.clearFlag == 0 and systems.aftCargoFireWarn.getBoolValue() and (getprop("/ECAM/warning-phase") <= 3 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") == 6)) {
cargoSmokeAft.active = 1;
} elsif (cargoSmokeAft.clearFlag == 1 or systems.cargoTestBtnOff.getBoolValue()) {
ECAM_controller.warningReset(cargoSmokeAft);
cargoSmokeAft.hasSubmsg = 1;
systems.cargoTestBtnOff.setBoolValue(0);
}
if (cargoSmokeAftAgent.clearFlag == 0 and cargoSmokeAft.active == 1 and !getprop("/systems/fire/cargo/disch")) {
cargoSmokeAftAgent.active = 1;
} else {
ECAM_controller.warningReset(cargoSmokeAftAgent);
cargoSmokeAft.hasSubmsg = 0;
}
} else {
if (systems.aftCargoFireWarn.getBoolValue()) {
cargoSmokeFwd.active = 1;
cargoSmokeFwdAgent.active = 1;
cargoSmokeAft.active = 1;
cargoSmokeAftAgent.active = 1;
} else {
ECAM_controller.warningReset(cargoSmokeFwd);
ECAM_controller.warningReset(cargoSmokeFwdAgent);
ECAM_controller.warningReset(cargoSmokeAft);
ECAM_controller.warningReset(cargoSmokeAftAgent);
}
}
}
var messages_priority_2 = func {
if (apuEmerShutdown.clearFlag == 0 and systems.apuEmerShutdown.getBoolValue() and !getprop("/systems/fire/apu/warning-active") and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
apuEmerShutdown.active = 1;
} elsif (apuEmerShutdown.clearFlag == 1) {
ECAM_controller.warningReset(apuEmerShutdown);
apuEmerShutdown.hasSubmsg = 1;
}
if (apuEmerShutdownMast.clearFlag == 0 and getprop("/controls/APU/master") and apuEmerShutdown.active == 1) {
apuEmerShutdownMast.active = 1;
} else {
ECAM_controller.warningReset(apuEmerShutdownMast);
apuEmerShutdown.hasSubmsg = 0;
}
if (eng1FireDetFault.clearFlag == 0 and (systems.engFireDetectorUnits.vector[0].condition == 0 or (systems.engFireDetectorUnits.vector[0].loopOne == 9 and systems.engFireDetectorUnits.vector[0].loopTwo == 9 and systems.eng1Inop.getBoolValue())) and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
eng1FireDetFault.active = 1;
} else {
ECAM_controller.warningReset(eng1FireDetFault);
}
if (eng1LoopAFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[0].loopOne == 9 and systems.engFireDetectorUnits.vector[0].loopTwo != 9 and !systems.eng1Inop.getBoolValue() and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
eng1LoopAFault.active = 1;
} else {
ECAM_controller.warningReset(eng1LoopAFault);
}
if (eng1LoopBFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[0].loopOne != 9 and systems.engFireDetectorUnits.vector[0].loopTwo == 9 and !systems.eng1Inop.getBoolValue() and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
eng1LoopBFault.active = 1;
} else {
ECAM_controller.warningReset(eng1LoopBFault);
}
if (eng2FireDetFault.clearFlag == 0 and (systems.engFireDetectorUnits.vector[1].condition == 0 or (systems.engFireDetectorUnits.vector[1].loopOne == 9 and systems.engFireDetectorUnits.vector[1].loopTwo == 9 and systems.eng2Inop.getBoolValue())) and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
eng2FireDetFault.active = 1;
} else {
ECAM_controller.warningReset(eng2FireDetFault);
}
if (eng2LoopAFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[1].loopOne == 9 and systems.engFireDetectorUnits.vector[1].loopTwo != 9 and !systems.eng2Inop.getBoolValue() and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
eng2LoopAFault.active = 1;
} else {
ECAM_controller.warningReset(eng2LoopAFault);
}
if (eng2LoopBFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[1].loopOne != 9 and systems.engFireDetectorUnits.vector[1].loopTwo == 9 and !systems.eng2Inop.getBoolValue() and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
eng2LoopBFault.active = 1;
} else {
ECAM_controller.warningReset(eng2LoopBFault);
}
if (apuFireDetFault.clearFlag == 0 and (systems.engFireDetectorUnits.vector[2].condition == 0 or (systems.engFireDetectorUnits.vector[2].loopOne == 9 and systems.engFireDetectorUnits.vector[2].loopTwo == 9 and systems.apuInop.getBoolValue())) and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
apuFireDetFault.active = 1;
} else {
ECAM_controller.warningReset(apuFireDetFault);
}
if (apuLoopAFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[2].loopOne == 9 and systems.engFireDetectorUnits.vector[2].loopTwo != 9 and !systems.apuInop.getBoolValue() and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
apuLoopAFault.active = 1;
} else {
ECAM_controller.warningReset(apuLoopAFault);
}
if (apuLoopBFault.clearFlag == 0 and systems.engFireDetectorUnits.vector[2].loopOne != 9 and systems.engFireDetectorUnits.vector[2].loopTwo == 9 and !systems.apuInop.getBoolValue() and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
apuLoopBFault.active = 1;
} else {
ECAM_controller.warningReset(apuLoopBFault);
}
if (crgAftFireDetFault.clearFlag == 0 and (systems.cargoSmokeDetectorUnits.vector[0].condition == 0 or systems.cargoSmokeDetectorUnits.vector[1].condition == 0) and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
crgAftFireDetFault.active = 1;
} else {
ECAM_controller.warningReset(crgAftFireDetFault);
}
if (crgFwdFireDetFault.clearFlag == 0 and systems.cargoSmokeDetectorUnits.vector[2].condition == 0 and (getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") >= 9 or getprop("/ECAM/warning-phase") <= 2)) {
crgFwdFireDetFault.active = 1;
} else {
ECAM_controller.warningReset(crgFwdFireDetFault);
}
}
var messages_priority_2 = func {}
var messages_priority_1 = func {}
var messages_priority_0 = func {}
@ -318,7 +923,7 @@ var messages_right_memo = func {
ldg_inhibit.active = 0;
}
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/systems/failures/cargo-aft-fire") == 1 or getprop("/systems/failures/cargo-fwd-fire") == 1) or (((getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/engines/engine[0]/state") == 3) and (getprop("/systems/hydraulic/yellow-psi") < 1500 and getprop("/engines/engine[1]/state") == 3)) or ((getprop("/systems/hydraulic/green-psi") < 1500 or getprop("/systems/hydraulic/yellow-psi") < 1500) and getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") == 3) and phaseVar >= 3 and phaseVar <= 8)) {
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/systems/fire/engine1/warning-active") == 1 or getprop("/systems/fire/engine2/warning-active") == 1 or getprop("/systems/fire/apu/warning-active") == 1 or getprop("/systems/failures/cargo-aft-fire") == 1 or getprop("/systems/failures/cargo-fwd-fire") == 1) or (((getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/engines/engine[0]/state") == 3) and (getprop("/systems/hydraulic/yellow-psi") < 1500 and getprop("/engines/engine[1]/state") == 3)) or ((getprop("/systems/hydraulic/green-psi") < 1500 or getprop("/systems/hydraulic/yellow-psi") < 1500) and getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") == 3) and phaseVar >= 3 and phaseVar <= 8)) {
# todo: emer elec
land_asap_r.active = 1;
} else {
@ -492,7 +1097,7 @@ var messages_right_memo = func {
}
}
# Listener
# Listeners
setlistener("/controls/fctl/fac1", func() {
if (dualFail.active == 0) { return; }
@ -502,3 +1107,19 @@ setlistener("/controls/fctl/fac1", func() {
dualFailFACActive = 1;
}
}, 0, 0);
setlistener("/engines/engine[0]/state", func() {
if ((state1Node.getValue() != 3 and state2Node.getValue() != 3) and wowNode.getValue() == 0) {
dualFailNode.setBoolValue(1);
} else {
dualFailNode.setBoolValue(0);
}
}, 0, 0);
setlistener("/engines/engine[1]/state", func() {
if ((state1Node.getValue() != 3 and state2Node.getValue() != 3) and wowNode.getValue() == 0) {
dualFailNode.setBoolValue(1);
} else {
dualFailNode.setBoolValue(0);
}
}, 0, 0);

View file

@ -13,32 +13,95 @@ var warnings = std.Vector.new([
var flap_not_zero = warning.new(msg: "F/CTL FLAP LVR NOT ZERO", colour: "r", aural: 0, light: 0),
# DUAL ENG FAIL
var dualFail = warning.new(msg: "ENG DUAL FAILURE", colour: "r", aural: 0, light: 0),
var dualFailModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c", aural: 9, light: 9),
var dualFailLevers = warning.new(msg: " -THR LEVERS........IDLE", colour: "c", aural: 9, light: 9),
var dualFailRelightSPD = warning.new(msg: " OPTIMUM RELIGHT SPD.280", colour: "c", aural: 9, light: 9),
var dualFailRelightSPDCFM = warning.new(msg: " OPTIMUM RELIGHT SPD.300", colour: "c", aural: 9, light: 9),
var dualFailElec = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c", aural: 9, light: 9),
var dualFailRadio = warning.new(msg: " -VHF1/ATC1..........USE", colour: "c", aural: 9, light: 9),
var dualFailFAC = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c", aural: 9, light: 9),
var dualFailRelight = warning.new(msg: "•IF NO RELIGHT AFTER 30S", colour: "w", aural: 9, light: 9),
var dualFailMasters = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c", aural: 9, light: 9),
var dualFailSuccess = warning.new(msg: " •IF UNSUCCESSFUL : ", colour: "w", aural: 9, light: 9),
var dualFailAPU = warning.new(msg: " -APU (IF AVAIL)...START", colour: "c", aural: 9, light: 9),
var dualFailMastersAPU = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c", aural: 9, light: 9),
var dualFailSPDGD = warning.new(msg: " OPTIMUM SPEED.....G DOT", colour: "c", aural: 9, light: 9),
var dualFailAPPR = warning.new(msg: " •EARLY IN APPR : ", colour: "w", aural: 9, light: 9),
var dualFailcabin = warning.new(msg: " -CAB SECURE.......ORDER", colour: "c", aural: 9, light: 9),
var dualFailrudd = warning.new(msg: " -USE RUDDER WITH CARE ", colour: "c", aural: 9, light: 9),
var dualFailflap = warning.new(msg: " -FOR LDG.....USE FLAP 3", colour: "c", aural: 9, light: 9),
var dualFail5000 = warning.new(msg: " •AT 5000 FT AGL : ", colour: "w", aural: 9, light: 9),
var dualFailgear = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c", aural: 9, light: 9),
var dualFailfinalspeed = warning.new(msg: " TARGET SPEED.....150 KT", colour: "c", aural: 9, light: 9),
var dualFailtouch = warning.new(msg: " •AT TOUCH DOWN : ", colour: "w", aural: 9, light: 9),
var dualFailmasteroff = warning.new(msg: " -ENG MASTERS........OFF", colour: "c", aural: 9, light: 9),
var dualFailapuoff = warning.new(msg: " -APU MASTER SW......OFF", colour: "c", aural: 9, light: 9),
var dualFailevac = warning.new(msg: " -EVAC..........INITIATE", colour: "c", aural: 9, light: 9),
var dualFailbatt = warning.new(msg: " -BAT 1+2............OFF", colour: "c", aural: 9, light: 9),
var dualFail = warning.new(msg: "ENG DUAL FAILURE", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
var dualFailModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"),
var dualFailLevers = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
var dualFailRelightSPD = warning.new(msg: " OPTIMUM RELIGHT SPD.280", colour: "c"),
var dualFailRelightSPDCFM = warning.new(msg: " OPTIMUM RELIGHT SPD.300", colour: "c"),
var dualFailElec = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
var dualFailRadio = warning.new(msg: " -VHF1/ATC1..........USE", colour: "c"),
var dualFailFAC = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"),
var dualFailRelight = warning.new(msg: "•IF NO RELIGHT AFTER 30S", colour: "w", hasSubmsg: 1),
var dualFailMasters = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c"),
var dualFailSuccess = warning.new(msg: " •IF UNSUCCESSFUL : ", colour: "w", hasSubmsg: 1),
var dualFailAPU = warning.new(msg: " -APU (IF AVAIL)...START", colour: "c"),
var dualFailAPUwing = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"),
var dualFailAPUbleed = warning.new(msg: " -APU BLEED...........ON", colour: "c"),
var dualFailMastersAPU = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c"),
var dualFailSPDGD = warning.new(msg: " OPTIMUM SPEED.....G DOT", colour: "c"),
var dualFailAPPR = warning.new(msg: " •EARLY IN APPR : ", colour: "w", hasSubmsg: 1),
var dualFailcabin = warning.new(msg: " -CAB SECURE.......ORDER", colour: "c"),
var dualFailrudd = warning.new(msg: " -USE RUDDER WITH CARE ", colour: "c"),
var dualFailflap = warning.new(msg: " -FOR LDG.....USE FLAP 3", colour: "c"),
var dualFail5000 = warning.new(msg: " •AT 5000 FT AGL : ", colour: "w", hasSubmsg: 1),
var dualFailgear = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c"),
var dualFailfinalspeed = warning.new(msg: " TARGET SPEED.....150 KT", colour: "c"),
var dualFailtouch = warning.new(msg: " •AT TOUCH DOWN : ", colour: "w", hasSubmsg: 1),
var dualFailmasteroff = warning.new(msg: " -ENG MASTERS........OFF", colour: "c"),
var dualFailapuoff = warning.new(msg: " -APU MASTER SW......OFF", colour: "c"),
var dualFailevac = warning.new(msg: " -EVAC..........INITIATE", colour: "c"),
var dualFailbatt = warning.new(msg: " -BAT 1+2............OFF", colour: "c"),
# ENG 1 FIRE (flight)
var eng1Fire = warning.new(msg: "ENG 1 FIRE", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
var eng1FireFllever = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"),
var eng1FireFlmaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"),
var eng1FireFlPB = warning.new(msg: " -ENG 1 FIRE P/B....PUSH", colour: "c"),
var eng1FireFlAgent1Timer = warning.new(msg: " -AGENT 1 AFT 10 S.DISCH", colour: "w"),
var eng1FireFlAgent1 = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"),
var eng1FireFlATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
var eng1FireFl30Sec = warning.new(msg: " •IF FIRE AFTER 30 S:", colour: "w", hasSubmsg: 1),
var eng1FireFlAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
# ENG 1 FIRE (ground)
var eng1FireGnlever = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
var eng1FireGnstopped = warning.new(msg: " •WHEN A/C IS STOPPED:", colour: "w", hasSubmsg: 1),
var eng1FireGnparkbrk = warning.new(msg: " -PARKING BRK.........ON", colour: "c"),
var eng1FireGnmaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"),
var eng1FireGnPB = warning.new(msg: " -ENG 1 FIRE P/B....PUSH", colour: "c"),
var eng1FireGnAgent1 = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"),
var eng1FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
var eng1FireGnmaster2 = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"),
var eng1FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
var eng1FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"),
var eng1FireGnevac = warning.new(msg: " •IF EVAC RQRD:", colour: "w", hasSubmsg: 1),
var eng1FireGnevacSw = warning.new(msg: " -EVAC COMMAND........ON", colour: "c"),
var eng1FireGnevacApu = warning.new(msg: " -APU MASTER SW......OFF", colour: "c"),
var eng1FireGnevacBat = warning.new(msg: " -BAT 1+2............OFF", colour: "c"),
# ENG 2 FIRE (flight)
var eng2Fire = warning.new(msg: "ENG 2 FIRE", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
var eng2FireFllever = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"),
var eng2FireFlmaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"),
var eng2FireFlPB = warning.new(msg: " -ENG 2 FIRE P/B....PUSH", colour: "c"),
var eng2FireFlAgent1Timer = warning.new(msg: " -AGENT 1 AFT 10 S.DISCH", colour: "w"),
var eng2FireFlAgent1 = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"),
var eng2FireFlATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
var eng2FireFl30Sec = warning.new(msg: " •IF FIRE AFTER 30 S:", colour: "w", hasSubmsg: 1),
var eng2FireFlAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
# ENG 2 FIRE (ground)
var eng2FireGnlever = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
var eng2FireGnstopped = warning.new(msg: " •WHEN A/C IS STOPPED:", colour: "w", hasSubmsg: 1),
var eng2FireGnparkbrk = warning.new(msg: " -PARKING BRK.........ON", colour: "c"),
var eng2FireGnmaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"),
var eng2FireGnPB = warning.new(msg: " -ENG 2 FIRE P/B....PUSH", colour: "c"),
var eng2FireGnAgent1 = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"),
var eng2FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
var eng2FireGnmaster2 = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"),
var eng2FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
var eng2FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"),
var eng2FireGnevac = warning.new(msg: " •IF EVAC RQRD:", colour: "w", hasSubmsg: 1),
var eng2FireGnevacSw = warning.new(msg: " -EVAC COMMAND........ON", colour: "c"),
var eng2FireGnevacApu = warning.new(msg: " -APU MASTER SW......OFF", colour: "c"),
var eng2FireGnevacBat = warning.new(msg: " -BAT 1+2............OFF", colour: "c"),
# APU FIRE
var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, hasSubmsg: 1, sdPage: "apu"),
var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"),
var apuFireAgentTimer = warning.new(msg: " -AGENT AFT 10 S...DISCH", colour: "c"),
var apuFireAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"),
var apuFireMaster = warning.new(msg: " -MASTER SW..........OFF", colour: "c"),
# Config
var slats_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0),
@ -54,28 +117,51 @@ var warnings = std.Vector.new([
var park_brk_config = warning.new(msg: "CONFIG PARK BRK ON", colour: "r", aural: 0, light: 0),
# Autopilot
var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", aural: 9, light: 0),
var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", light: 0),
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1),
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c", aural: 9, light: 9),
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1),
var athr_lock_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c", aural: 9, light: 9),
var athr_lock_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1),
var athr_lim_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c", aural: 9, light: 9)
var athr_lim_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
# Cargo smoke
var cargoSmokeFwd = warning.new(msg: "SMOKE FWD CARGO SMOKE", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
var cargoSmokeFwdAgent = warning.new(msg: "-AGENT............DISCH", colour: "c"),
var cargoSmokeAft = warning.new(msg: "SMOKE AFT CARGO SMOKE", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
var cargoSmokeAftAgent = warning.new(msg: "-AGENT............DISCH", colour: "c"),
# APU shutdown
var apuEmerShutdown = warning.new(msg: "APU EMER SHUT DOWN", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var apuEmerShutdownMast = warning.new(msg: " -MASTER SW..........OFF", colour: "c"),
# FIRE det fault
var eng1FireDetFault = warning.new(msg: "ENG 1 FIRE DET FAULT", colour: "a", aural: 1, light: 1),
var eng1LoopAFault = warning.new(msg: "ENG 1 FIRE LOOP A FAULT", colour: "a"),
var eng1LoopBFault = warning.new(msg: "ENG 1 FIRE LOOP B FAULT", colour: "a"),
var eng2FireDetFault = warning.new(msg: "ENG 2 FIRE DET FAULT", colour: "a", aural: 1, light: 1),
var eng2LoopAFault = warning.new(msg: "ENG 2 FIRE LOOP A FAULT", colour: "a"),
var eng2LoopBFault = warning.new(msg: "ENG 2 FIRE LOOP B FAULT", colour: "a"),
var apuFireDetFault = warning.new(msg: "APU FIRE DET FAULT", colour: "a", aural: 1, light: 1),
var apuLoopAFault = warning.new(msg: "APU FIRE LOOP A FAULT", colour: "a"),
var apuLoopBFault = warning.new(msg: "APU FIRE LOOP B FAULT", colour: "a"),
var crgFwdFireDetFault = warning.new(msg: "FWD CRG DET FAULT", colour: "a"),
var crgAftFireDetFault = warning.new(msg: "AFT CRG DET FAULT", colour: "a"),
]);
var leftmemos = std.Vector.new([
var company_alert = warning.new(msg: "COMPANY ALERT", colour: "g", aural: 9, light: 9), # Not yet implemented, buzzer sound
var refuelg = warning.new(msg: "REFUELG", colour: "g", aural: 9, light: 9),
var irs_in_align = warning.new(msg: "IRS IN ALIGN", colour: "g", aural: 9, light: 9), # Not yet implemented
var gnd_splrs = warning.new(msg: "GND SPLRS ARMED", colour: "g", aural: 9, light: 9),
var seatbelts = warning.new(msg: "SEAT BELTS", colour: "g", aural: 9, light: 9),
var nosmoke = warning.new(msg: "NO SMOKING", colour: "g", aural: 9, light: 9),
var strobe_lt_off = warning.new(msg: "STROBE LT OFF", colour: "g", aural: 9, light: 9),
var outr_tk_fuel_xfrd = warning.new(msg: "OUTR TK FUEL XFRD", colour: "g", aural: 9, light: 9), # Not yet implemented
var fob_3T = warning.new(msg: "FOB BELOW 3T", colour: "g", aural: 9, light: 9),
var gpws_flap_mode_off = warning.new(msg: "GPWS FLAP MODE OFF", colour: "g", aural: 9, light: 9),
var atc_datalink_stby = warning.new(msg: "ATC DATALINK STBY", colour: "g", aural: 9, light: 9), # Not yet implemented
var company_datalink_stby = warning.new(msg: "COMPANY DATALINK STBY", colour: "g", aural: 9, light: 9) # Not yet implemented
var company_alert = warning.new(msg: "COMPANY ALERT" ), # Not yet implemented, buzzer sound
var refuelg = warning.new(msg: "REFUELG" ),
var irs_in_align = warning.new(msg: "IRS IN ALIGN" ), # Not yet implemented
var gnd_splrs = warning.new(msg: "GND SPLRS ARMED" ),
var seatbelts = warning.new(msg: "SEAT BELTS" ),
var nosmoke = warning.new(msg: "NO SMOKING" ),
var strobe_lt_off = warning.new(msg: "STROBE LT OFF" ),
var outr_tk_fuel_xfrd = warning.new(msg: "OUTR TK FUEL XFRD" ), # Not yet implemented
var fob_3T = warning.new(msg: "FOB BELOW 3T" ),
var gpws_flap_mode_off = warning.new(msg: "GPWS FLAP MODE OFF" ),
var atc_datalink_stby = warning.new(msg: "ATC DATALINK STBY" ), # Not yet implemented
var company_datalink_stby = warning.new(msg: "COMPANY DATALINK STBY") # Not yet implemented
]);
# Right E/WD
@ -103,45 +189,45 @@ var secondaryFailures = std.Vector.new([
]);
var memos = std.Vector.new([
var spd_brk = memo.new(msg: "SPEED BRK", colour: "g"),
var park_brk = memo.new(msg: "PARK BRK", colour: "g"),
var ptu = memo.new(msg: "HYD PTU", colour: "g"),
var rat = memo.new(msg: "RAT OUT", colour: "g"),
var emer_gen = memo.new(msg: "EMER GEN", colour: "g"),
var ram_air = memo.new(msg: "RAM AIR ON", colour: "g"),
var nw_strg_disc = memo.new(msg: "NW STRG DISC", colour: "g"),
var ignition = memo.new(msg: "IGNITION", colour: "g"),
var cabin_ready = memo.new(msg: "CABIN READY", colour: "g"), # Not yet implemented
var pred_ws_off = memo.new(msg: "PRED W/S OFF", colour: "g"), # Not yet implemented
var terr_stby = memo.new(msg: "TERR STBY", colour: "g"), # Not yet implemented
var tcas_stby = memo.new(msg: "TCAS STBY", colour: "g"), # Not yet implemented
var acars_call = memo.new(msg: "ACARS CALL", colour: "g"), # Not yet implemented
var company_call = memo.new(msg: "COMPANY CALL", colour: "g"), # Not yet implemented
var satcom_alert = memo.new(msg: "SATCOM ALERT", colour: "g"), # Not yet implemented
var acars_msg = memo.new(msg: "ACARS MSG", colour: "g"), # Not yet implemented
var company_msg = memo.new(msg: "COMPANY MSG", colour: "g"), # Not yet implemented
var eng_aice = memo.new(msg: "ENG A.ICE", colour: "g"),
var wing_aice = memo.new(msg: "WING A.ICE", colour: "g"),
var ice_not_det = memo.new(msg: "ICE NOT DET", colour: "g"), # Not yet implemented
var hi_alt = memo.new(msg: "HI ALT", colour: "g"), # Not yet implemented
var apu_avail = memo.new(msg: "APU AVAIL", colour: "g"),
var apu_bleed = memo.new(msg: "APU BLEED", colour: "g"),
var ldg_lt = memo.new(msg: "LDG LT", colour: "g"),
var brk_fan = memo.new(msg: "BRK FAN", colour: "g"), # Not yet implemented
var audio3_xfrd = memo.new(msg: "AUDIO 3 XFRD", colour: "g"), # Not yet implemented
var switchg_pnl = memo.new(msg: "SWITCHG PNL", colour: "g"), # Not yet implemented
var gpws_flap3 = memo.new(msg: "GPWS FLAP 3", colour: "g"),
var hf_data_ovrd = memo.new(msg: "HF DATA OVRD", colour: "g"), # Not yet implemented
var hf_voice = memo.new(msg: "HF VOICE", colour: "g"), # Not yet implemented
var acars_stby = memo.new(msg: "ACARS STBY", colour: "g"), # Not yet implemented
var vhf3_voice = memo.new(msg: "VHF3 VOICE", colour: "g"),
var auto_brk_lo = memo.new(msg: "AUTO BRK LO", colour: "g"),
var auto_brk_med = memo.new(msg: "AUTO BRK MED", colour: "g"),
var auto_brk_max = memo.new(msg: "AUTO BRK MAX", colour: "g"),
var auto_brk_off = memo.new(msg: "AUTO BRK OFF", colour: "g"), # Not yet implemented
var man_ldg_elev = memo.new(msg: "MAN LDG ELEV", colour: "g"), # Not yet implemented
var ctr_tk_feedg = memo.new(msg: "CTR TK FEEDG", colour: "g"),
var fuelx = memo.new(msg: "FUEL X FEED", colour: "g")
var spd_brk = memo.new(msg: "SPEED BRK" ),
var park_brk = memo.new(msg: "PARK BRK" ),
var ptu = memo.new(msg: "HYD PTU" ),
var rat = memo.new(msg: "RAT OUT" ),
var emer_gen = memo.new(msg: "EMER GEN" ),
var ram_air = memo.new(msg: "RAM AIR ON" ),
var nw_strg_disc = memo.new(msg: "NW STRG DISC"),
var ignition = memo.new(msg: "IGNITION" ),
var cabin_ready = memo.new(msg: "CABIN READY" ), # Not yet implemented
var pred_ws_off = memo.new(msg: "PRED W/S OFF"), # Not yet implemented
var terr_stby = memo.new(msg: "TERR STBY" ), # Not yet implemented
var tcas_stby = memo.new(msg: "TCAS STBY" ), # Not yet implemented
var acars_call = memo.new(msg: "ACARS CALL" ), # Not yet implemented
var company_call = memo.new(msg: "COMPANY CALL"), # Not yet implemented
var satcom_alert = memo.new(msg: "SATCOM ALERT"), # Not yet implemented
var acars_msg = memo.new(msg: "ACARS MSG" ), # Not yet implemented
var company_msg = memo.new(msg: "COMPANY MSG" ), # Not yet implemented
var eng_aice = memo.new(msg: "ENG A.ICE" ),
var wing_aice = memo.new(msg: "WING A.ICE" ),
var ice_not_det = memo.new(msg: "ICE NOT DET" ), # Not yet implemented
var hi_alt = memo.new(msg: "HI ALT" ), # Not yet implemented
var apu_avail = memo.new(msg: "APU AVAIL" ),
var apu_bleed = memo.new(msg: "APU BLEED" ),
var ldg_lt = memo.new(msg: "LDG LT" ),
var brk_fan = memo.new(msg: "BRK FAN" ), # Not yet implemented
var audio3_xfrd = memo.new(msg: "AUDIO 3 XFRD"), # Not yet implemented
var switchg_pnl = memo.new(msg: "SWITCHG PNL" ), # Not yet implemented
var gpws_flap3 = memo.new(msg: "GPWS FLAP 3" ),
var hf_data_ovrd = memo.new(msg: "HF DATA OVRD"), # Not yet implemented
var hf_voice = memo.new(msg: "HF VOICE" ), # Not yet implemented
var acars_stby = memo.new(msg: "ACARS STBY" ), # Not yet implemented
var vhf3_voice = memo.new(msg: "VHF3 VOICE" ),
var auto_brk_lo = memo.new(msg: "AUTO BRK LO" ),
var auto_brk_med = memo.new(msg: "AUTO BRK MED"),
var auto_brk_max = memo.new(msg: "AUTO BRK MAX"),
var auto_brk_off = memo.new(msg: "AUTO BRK OFF"), # Not yet implemented
var man_ldg_elev = memo.new(msg: "MAN LDG ELEV"), # Not yet implemented
var ctr_tk_feedg = memo.new(msg: "CTR TK FEEDG"),
var fuelx = memo.new(msg: "FUEL X FEED" )
]);
var clearWarnings = std.Vector.new();
@ -279,3 +365,6 @@ var statusInfo = std.Vector.new();
var statusCancelled = std.Vector.new();
var statusInop = std.Vector.new();
var statusMaintenance = std.Vector.new();
# hack thrust lock message:
var msgSave = athr_lock.msg;

View file

@ -180,6 +180,7 @@ var Custom = {
athrOff: props.globals.initNode("/it-autoflight/sound/athrsound", 0, "BOOL"),
enableAthrOff: 0,
},
ThrLock: props.globals.getNode("/systems/thrust/thr-locked", 1)
};
var ITAF = {
@ -492,6 +493,7 @@ var ITAF = {
if (s == 1) {
if (Misc.acEss.getValue() >= 110) {
Output.athr.setBoolValue(1);
Custom.ThrLock.setValue(0);
Custom.Sound.enableAthrOff = 1;
Custom.Sound.athrOff.setBoolValue(0);
}

View file

@ -638,20 +638,98 @@ var lockThr = func() {
state1 = getprop("/systems/thrust/state1");
state2 = getprop("/systems/thrust/state2");
if ((state1 == "CL" and state2 == "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 == "MCT" and state2 == "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
setprop("/systems/thrust/thr-lock-time", getprop("/sim/time/elapsed-sec"));
setprop("/systems/thrust/thr-locked", 1);
}
lockTimer.start();
}
}
var checkLockThr = func() {
if (getprop("/systems/thrust/thr-lock-time") + 5 > getprop("/sim/time/elapsed-sec")) { return; }
if (fmgc.Output.athr.getBoolValue()) {
lockTimer.stop();
setprop("/systems/thrust/thr-locked", 0);
setprop("/systems/thrust/thr-locked-alert", 0);
setprop("/systems/thrust/thr-lock-time", 0);
setprop("/systems/thrust/thr-locked-flash", 0);
return;
}
if (getprop("/systems/thrust/thr-locked") == 0) {
lockTimer.stop();
setprop("/systems/thrust/thr-locked", 0);
setprop("/systems/thrust/thr-locked-alert", 0);
setprop("/systems/thrust/thr-lock-time", 0);
setprop("/systems/thrust/thr-locked-flash", 0);
return;
}
state1 = getprop("/systems/thrust/state1");
state2 = getprop("/systems/thrust/state2");
if ((state1 != "CL" and state2 != "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 != "MCT" and state2 != "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
setprop("/systems/thrust/thr-locked", 0);
lockTimer.stop();
setprop("/systems/thrust/thr-locked", 0);
setprop("/systems/thrust/thr-locked-alert", 0);
setprop("/systems/thrust/thr-lock-time", 0);
setprop("/systems/thrust/thr-locked-flash", 0);
} elsif ((state1 == "CL" and state2 == "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 == "MCT" and state2 == "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
setprop("/systems/thrust/thr-locked-alert", 1);
setprop("/systems/thrust/thr-lock-time", getprop("/sim/time/elapsed-sec"));
setprop("/systems/thrust/thr-locked-flash", 1);
lockTimer.stop();
lockTimer2.start();
}
}
var checkLockThr2 = func() {
if (fmgc.Output.athr.getBoolValue()) {
lockTimer2.stop();
setprop("/systems/thrust/thr-locked", 0);
setprop("/systems/thrust/thr-locked-alert", 0);
setprop("/systems/thrust/thr-lock-time", 0);
setprop("/systems/thrust/thr-locked-flash", 0);
return;
}
var lockTimer = maketimer(0.02, checkLockThr);
if (getprop("/systems/thrust/thr-locked") == 0) {
lockTimer2.stop();
setprop("/systems/thrust/thr-locked", 0);
setprop("/systems/thrust/thr-locked-alert", 0);
setprop("/systems/thrust/thr-lock-time", 0);
setprop("/systems/thrust/thr-locked-flash", 0);
return;
}
if (getprop("/systems/thrust/thr-lock-time") + 5 < getprop("/sim/time/elapsed-sec")) {
setprop("/systems/thrust/thr-locked-flash", 0);
settimer(func() {
setprop("/systems/thrust/thr-locked-flash", 1);
setprop("/systems/thrust/thr-lock-time", getprop("/sim/time/elapsed-sec"));
ecam.athr_lock.noRepeat = 0;
ecam.athr_lock.noRepeat2 = 0;
}, 0.2);
}
state1 = getprop("/systems/thrust/state1");
state2 = getprop("/systems/thrust/state2");
if ((state1 != "CL" and state2 != "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 != "MCT" and state2 != "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
lockTimer2.stop();
setprop("/systems/thrust/thr-locked", 0);
setprop("/systems/thrust/thr-locked-alert", 0);
setprop("/systems/thrust/thr-lock-time", 0);
setprop("/systems/thrust/thr-locked-flash", 0);
}
}
setlistener("/controls/APU/master", func() {
if (!getprop("/controls/APU/master") and systems.apuEmerShutdown.getBoolValue()) {
systems.apuEmerShutdown.setBoolValue(0);
}
}, 0, 0);
var lockTimer = maketimer(0.1, checkLockThr);
var lockTimer2 = maketimer(0.1, checkLockThr2);

View file

@ -52,6 +52,9 @@ setprop("/systems/thrust/lim-flex", 0);
setprop("/engines/flex-derate", 0);
setprop("/systems/thrust/eng-out", 0);
setprop("/systems/thrust/thr-locked", 0);
setprop("/systems/thrust/thr-locked-alert", 0);
setprop("/systems/thrust/thr-locked-flash", 0);
setprop("/systems/thrust/thr-lock-time", 0);
setprop("/systems/thrust/thr-lock-cmd[0]", 0);
setprop("/systems/thrust/thr-lock-cmd[1]", 0);

File diff suppressed because it is too large Load diff

View file

@ -837,7 +837,7 @@
<apoff>
<name>apoff-looped</name>
<mode>looped</mode>
<path>Aircraft/IDG-A32X/Sounds/apoff.wav</path>
<path>Aircraft/IDG-A32X/Sounds/Cockpit/calvary-charge-loop.wav</path>
<condition>
<and>
<equals>
@ -867,7 +867,7 @@
<apoff>
<name>apoff-single</name>
<mode>once</mode>
<path>Aircraft/IDG-A32X/Sounds/apoff.wav</path>
<path>Aircraft/IDG-A32X/Sounds/Cockpit/calvary-charge-once.wav</path>
<condition>
<and>
<equals>
@ -1697,11 +1697,16 @@
<mode>looped</mode>
<type>avionics</type>
<condition>
<and>
<property>/ECAM/warnings/master-warning-light</property>
<property>/sim/sound/warnings/crc</property>
</and>
</condition>
<volume>
<product>
<property>/systems/acconfig/options/sound/avionics-volume</property>
<value>0.8</value>
</product>
</volume>
<reference-dist>10</reference-dist>
<max-dist>100</max-dist>

BIN
Sounds/Cockpit/c-chord.wav Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Sounds/Cockpit/click.wav Normal file

Binary file not shown.

Binary file not shown.

BIN
Sounds/Cockpit/cricket.wav Normal file

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,123 @@
<!-- Copyright (c) 2019 Jonathan Redpath (legoboyvdlp) -->
<system name="A320: Engine Fire">
<channel name="Engine Fire">
<fcs_function name="enginefire1">
<function>
<sum>
<property>/systems/fire/engine1/temperature</property>
<product>
<table>
<independentVar lookup="row">/systems/failures/engine-left-fire</independentVar>
<tableData>
0 -5
1 30
</tableData>
</table>
<property>simulation/channel-dt</property>
</product>
</sum>
</function>
<clipto>
<min>0</min>
<max>300</max>
</clipto>
<output>/systems/fire/engine1/temperature</output>
</fcs_function>
<fcs_function name="enginefire2">
<function>
<sum>
<property>/systems/fire/engine2/temperature</property>
<product>
<table>
<independentVar lookup="row">/systems/failures/engine-right-fire</independentVar>
<tableData>
0 -5
1 30
</tableData>
</table>
<property>simulation/channel-dt</property>
</product>
</sum>
</function>
<clipto>
<min>0</min>
<max>300</max>
</clipto>
<output>/systems/fire/engine2/temperature</output>
</fcs_function>
<fcs_function name="apufire">
<function>
<sum>
<property>/systems/fire/apu/temperature</property>
<product>
<table>
<independentVar lookup="row">/systems/failures/apu-fire</independentVar>
<tableData>
0 -5
1 45
</tableData>
</table>
<property>simulation/channel-dt</property>
</product>
</sum>
</function>
<clipto>
<min>0</min>
<max>300</max>
</clipto>
<output>/systems/fire/apu/temperature</output>
</fcs_function>
</channel>
<channel name="Cargo Fire">
<fcs_function name="fwdfire">
<function>
<sum>
<property>/systems/fire/cargo/fwd/temperature</property>
<product>
<table>
<independentVar lookup="row">/systems/failures/cargo-fwd-fire</independentVar>
<tableData>
0 -5
1 30
</tableData>
</table>
<property>simulation/channel-dt</property>
</product>
</sum>
</function>
<clipto>
<min>0</min>
<max>300</max>
</clipto>
<output>/systems/fire/cargo/fwd/temperature</output>
</fcs_function>
<fcs_function name="aftfire">
<function>
<sum>
<property>/systems/fire/cargo/aft/temperature</property>
<product>
<table>
<independentVar lookup="row">/systems/failures/cargo-aft-fire</independentVar>
<tableData>
0 -5
1 45
</tableData>
</table>
<property>simulation/channel-dt</property>
</product>
</sum>
</function>
<clipto>
<min>0</min>
<max>300</max>
</clipto>
<output>/systems/fire/cargo/aft/temperature</output>
</fcs_function>
</channel>
</system>

View file

@ -1165,5 +1165,4 @@
<output>/instrumentation/ddrmi/flag-2</output>
<filter-time>0.64</filter-time>
</filter>
</PropertyList>

View file

@ -1,3 +1,6 @@
Thank you to:
Amanda Santos for the sound "botaodepressao", used for the overhead panel under the CC0 license:
https://freesound.org/people/amandasantos/sounds/392148/
Nguyen Van Hai for the sound "crc", used for the warning system
https://www.youtube.com/watch?v=IzNeDvVgrhg