1
0
Fork 0

Merge branch 'master' into autopush

This commit is contained in:
legoboyvdlp R 2019-10-24 16:48:37 +01:00
commit 2c0fa9cadc
8 changed files with 695 additions and 103 deletions

View file

@ -111,6 +111,11 @@ var switch_pack1 = props.globals.getNode("/controls/pneumatic/switches/pack1", 1
var switch_pack2 = props.globals.getNode("/controls/pneumatic/switches/pack2", 1); var switch_pack2 = props.globals.getNode("/controls/pneumatic/switches/pack2", 1);
var oil_qt1_actual = props.globals.getNode("/engines/engine[0]/oil-qt-actual", 1); var oil_qt1_actual = props.globals.getNode("/engines/engine[0]/oil-qt-actual", 1);
var oil_qt2_actual = props.globals.getNode("/engines/engine[1]/oil-qt-actual", 1); var oil_qt2_actual = props.globals.getNode("/engines/engine[1]/oil-qt-actual", 1);
var fuel_used_lbs1 = props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs", 1);
var fuel_used_lbs2 = props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs", 1);
var fuel_left_quantity = props.globals.getNode("/consumables/fuel/tank[0]/level-lbs", 1);
var fuel_center_quantity = props.globals.getNode("/consumables/fuel/tank[1]/level-lbs", 1);
var fuel_right_quantity = props.globals.getNode("/consumables/fuel/tank[2]/level-lbs", 1);
var doorL1_pos = props.globals.getNode("sim/model/door-positions/doorl1/position-norm", 1); var doorL1_pos = props.globals.getNode("sim/model/door-positions/doorl1/position-norm", 1);
var doorR1_pos = props.globals.getNode("sim/model/door-positions/doorr1/position-norm", 1); var doorR1_pos = props.globals.getNode("sim/model/door-positions/doorr1/position-norm", 1);
var doorL4_pos = props.globals.getNode("sim/model/door-positions/doorl4/position-norm", 1); var doorL4_pos = props.globals.getNode("sim/model/door-positions/doorl4/position-norm", 1);
@ -219,6 +224,10 @@ var fadec1 = props.globals.getNode("/systems/fadec/powered1", 1);
var fadec2 = props.globals.getNode("/systems/fadec/powered2", 1); var fadec2 = props.globals.getNode("/systems/fadec/powered2", 1);
var fuel_flow1 = props.globals.getNode("/engines/engine[0]/fuel-flow_actual", 1); var fuel_flow1 = props.globals.getNode("/engines/engine[0]/fuel-flow_actual", 1);
var fuel_flow2 = props.globals.getNode("/engines/engine[1]/fuel-flow_actual", 1); var fuel_flow2 = props.globals.getNode("/engines/engine[1]/fuel-flow_actual", 1);
var fuel_left_outer_temp = props.globals.getNode("/consumables/fuel/tank[0]/temperature_degC", 1);
var fuel_left_inner_temp = props.globals.getNode("/consumables/fuel/tank[0]/temperature_degC", 1);
var fuel_right_outer_temp = props.globals.getNode("/consumables/fuel/tank[1]/temperature_degC", 1);
var fuel_right_inner_temp = props.globals.getNode("/consumables/fuel/tank[1]/temperature_degC", 1);
var cutoff_switch1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1); var cutoff_switch1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
var cutoff_switch2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1); var cutoff_switch2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
var fuel_xfeed = props.globals.getNode("/controls/fuel/x-feed", 1); var fuel_xfeed = props.globals.getNode("/controls/fuel/x-feed", 1);
@ -1786,7 +1795,7 @@ var canvas_lowerECAM_eng = {
return m; return m;
}, },
getKeys: func() { getKeys: func() {
return ["TAT","SAT","GW","UTCh","UTCm","OilQT1-needle","OilQT2-needle","OilQT1","OilQT2","OilQT1-decimal","OilQT2-decimal","OilPSI1-needle","OilPSI2-needle","OilPSI1","OilPSI2"]; return ["TAT","SAT","GW","UTCh","UTCm","OilQT1-needle","OilQT2-needle","OilQT1","OilQT2","OilQT1-decimal","OilQT2-decimal","OilPSI1-needle","OilPSI2-needle","OilPSI1","OilPSI2","FUEL-used-1","FUEL-used-2"];
}, },
update: func() { update: func() {
# Oil Quantity # Oil Quantity
@ -1821,6 +1830,10 @@ var canvas_lowerECAM_eng = {
me["OilPSI1-needle"].setRotation((oil_psi1.getValue() + 90) * D2R); me["OilPSI1-needle"].setRotation((oil_psi1.getValue() + 90) * D2R);
me["OilPSI2-needle"].setRotation((oil_psi2.getValue() + 90) * D2R); me["OilPSI2-needle"].setRotation((oil_psi2.getValue() + 90) * D2R);
# Fuel Used
me["FUEL-used-1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue(), 10)));
me["FUEL-used-2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue(), 10)));
me.updateBottomStatus(); me.updateBottomStatus();
}, },
}; };
@ -2219,23 +2232,23 @@ var canvas_lowerECAM_fuel = {
return m; return m;
}, },
getKeys: func() { getKeys: func() {
return["TAT","SAT","GW","UTCh","UTCm","FUEL-Pump-Left-1","FUEL-Pump-Left-2","FUEL-Pump-Center-1","FUEL-Pump-Center-2","FUEL-Pump-Right-1","FUEL-Pump-Right-2","FUEL-Left-blocked","FUEL-Right-blocked","FUEL-Center-blocked","FUEL-Left-Tranfser", return["TAT","SAT","GW","UTCh","UTCm","FUEL-Pump-Left-1","FUEL-Pump-Left-2","FUEL-Pump-Center-1","FUEL-Pump-Center-2","FUEL-Pump-Right-1","FUEL-Pump-Right-2","FUEL-Left-blocked","FUEL-Right-blocked","FUEL-Center-blocked","FUEL-Left-Transfer",
"FUEL-Right-Tranfse","FUEL-Left-Outer-Inacc","FUEL-Left-Inner-Inacc","FUEL-Center-Inacc","FUEL-Right-Inner-Inacc","FUEL-Right-Outer-Inacc","FUEL-Left-Outer-quantity","FUEL-Left-Inner-quantity","FUEL-Center-quantity","FUEL-Right-Inner-quantity", "FUEL-Right-Transfer","FUEL-Left-Outer-Inacc","FUEL-Left-Inner-Inacc","FUEL-Center-Inacc","FUEL-Right-Inner-Inacc","FUEL-Right-Outer-Inacc","FUEL-Left-Outer-quantity","FUEL-Left-Inner-quantity","FUEL-Center-quantity","FUEL-Right-Inner-quantity",
"FUEL-Right-Outer-quantity","FUEL-On-Board","FUEL-Flow-per-min","FUEL-APU-arrow","FUEL-APU-label","FUEL-used-1","FUEL-used-both","FUEL-used-2","FUEL-ENG-Master-1","FUEL-ENG-Master-2","FUEL-XFEED","FUEL-XFEED-pipes","FUEL-Left-Outer-temp", "FUEL-Right-Outer-quantity","FUEL-On-Board","FUEL-Flow-per-min","FUEL-APU-arrow","FUEL-APU-label","FUEL-used-1","FUEL-used-both","FUEL-used-2","FUEL-ENG-Master-1","FUEL-ENG-Master-2","FUEL-XFEED","FUEL-XFEED-pipes","FUEL-Left-Outer-temp",
"FUEL-Left-Inner-temp","FUEL-Right-Inner-temp","FUEL-Right-Outer-temp","FUEL-Pump-Left-1-Closed","FUEL-Pump-Left-1-Open","FUEL-Pump-Left-2-Closed","FUEL-Pump-Left-2-Open","FUEL-Pump-Center-1-Open","FUEL-Pump-Center-1-Closed","FUEL-Pump-Center-2-Closed", "FUEL-Left-Inner-temp","FUEL-Right-Inner-temp","FUEL-Right-Outer-temp","FUEL-Pump-Left-1-Closed","FUEL-Pump-Left-1-Open","FUEL-Pump-Left-2-Closed","FUEL-Pump-Left-2-Open","FUEL-Pump-Center-1-Open","FUEL-Pump-Center-1-Closed","FUEL-Pump-Center-2-Closed",
"FUEL-Pump-Center-2-Open","FUEL-Pump-Right-1-Closed","FUEL-Pump-Right-1-Open","FUEL-Pump-Right-2-Closed","FUEL-Pump-Right-2-Open","FUEL-ENG-1-label","FUEL-ENG-2-label","FUEL-ENG-1-pipe","FUEL-ENG-2-pipe","FUEL-Right-Tranfser","ENG1idFFlow","ENG2idFFlow"]; "FUEL-Pump-Center-2-Open","FUEL-Pump-Right-1-Closed","FUEL-Pump-Right-1-Open","FUEL-Pump-Right-2-Closed","FUEL-Pump-Right-2-Open","FUEL-ENG-1-label","FUEL-ENG-2-label","FUEL-ENG-1-pipe","FUEL-ENG-2-pipe","ENG1idFFlow","ENG2idFFlow","FUEL-used-1","FUEL-used-2","FUEL-used-both"];
}, },
update: func() { update: func() {
# if (getprop("engines/engine[0]/n1-actual") < getprop("/controls/engines/idle-limit")) { # if (getprop("engines/engine[0]/n1-actual") < getprop("/controls/engines/idle-limit")) {
if (eng1_n1.getValue() < 19.7) { if (eng1_n1.getValue() <= 18.9) {
me["ENG1idFFlow"].setColor(0.7333,0.3803,0); me["ENG1idFFlow"].setColor(0.7333,0.3803,0);
} else { } else {
me["ENG1idFFlow"].setColor(0.8078,0.8039,0.8078); me["ENG1idFFlow"].setColor(0.8078,0.8039,0.8078);
} }
# if (getprop("engines/engine[1]/n1-actual") < getprop("/controls/engines/idle-limit")) { # if (getprop("engines/engine[1]/n1-actual") < getprop("/controls/engines/idle-limit")) {
if (eng2_n1.getValue() < 19.7) { if (eng2_n1.getValue() <= 18.9) {
me["ENG2idFFlow"].setColor(0.7333,0.3803,0); me["ENG2idFFlow"].setColor(0.7333,0.3803,0);
} else { } else {
me["ENG2idFFlow"].setColor(0.8078,0.8039,0.8078); me["ENG2idFFlow"].setColor(0.8078,0.8039,0.8078);
@ -2246,14 +2259,14 @@ var canvas_lowerECAM_fuel = {
if (fadec1.getValue() == 1 and fadec2.getValue() == 1) { if (fadec1.getValue() == 1 and fadec2.getValue() == 1) {
me["FUEL-Flow-per-min"].setColor(0.0509,0.7529,0.2941); me["FUEL-Flow-per-min"].setColor(0.0509,0.7529,0.2941);
me["FUEL-Flow-per-min"].setText(sprintf("%s", math.round((fuel_flow1.getValue() + fuel_flow2.getValue()) / 60, 1))); me["FUEL-Flow-per-min"].setText(sprintf("%s", math.round((fuel_flow1.getValue() + fuel_flow2.getValue()) / 60, 10)));
} else { } else {
me["FUEL-Flow-per-min"].setColor(0.7333,0.3803,0); me["FUEL-Flow-per-min"].setColor(0.7333,0.3803,0);
me["FUEL-Flow-per-min"].setText("XX"); me["FUEL-Flow-per-min"].setText("XX");
} }
# this is now bound to the ENG master switch # this is now bound to the ENG master switch
# TODO use the valve prop and add amber if diffrence between eng master and valve # TODO use the valve prop and add amber if difference between eng master and valve
# TODO add transition state # TODO add transition state
# TODO fix amber/green at the same time when closed # TODO fix amber/green at the same time when closed
if (cutoff_switch1.getValue() == 0) { if (cutoff_switch1.getValue() == 0) {
@ -2267,7 +2280,7 @@ var canvas_lowerECAM_fuel = {
} }
# this is now bound to the ENG master switch # this is now bound to the ENG master switch
# TODO use the valve prop and add amber if diffrence between eng master and valve # TODO use the valve prop and add amber if difference between eng master and valve
# TODO add transition state # TODO add transition state
# TODO fix amber/green at the same time when closed # TODO fix amber/green at the same time when closed
if (cutoff_switch2.getValue() == 0) { if (cutoff_switch2.getValue() == 0) {
@ -2364,6 +2377,49 @@ var canvas_lowerECAM_fuel = {
me["FUEL-Pump-Right-2"].setColor(0.7333,0.3803,0); me["FUEL-Pump-Right-2"].setColor(0.7333,0.3803,0);
} }
# Fuel Used
me["FUEL-used-1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue(), 10)));
me["FUEL-used-2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue(), 10)));
me["FUEL-used-both"].setText(sprintf("%s", (math.round(fuel_used_lbs1.getValue(), 10) + math.round(fuel_used_lbs2.getValue(), 10))));
# Fuel Temp
me["FUEL-Left-Outer-temp"].setText(sprintf("%s", math.round(fuel_left_outer_temp.getValue())));
me["FUEL-Left-Inner-temp"].setText(sprintf("%s", math.round(fuel_left_inner_temp.getValue())));
me["FUEL-Right-Outer-temp"].setText(sprintf("%s", math.round(fuel_right_outer_temp.getValue())));
me["FUEL-Right-Inner-temp"].setText(sprintf("%s", math.round(fuel_right_inner_temp.getValue())));
# Fuel Quantity
# TODO add LO indication
if (fuel_left_quantity.getValue() >= 3170) {
me["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(fuel_left_quantity.getValue() - 1520, 10)));
me["FUEL-Left-Outer-quantity"].setText(sprintf("%s", 1520));
me["FUEL-Left-Transfer"].hide();
} else if (fuel_left_quantity.getValue() >= 1650) {
me["FUEL-Left-Inner-quantity"].setText(sprintf("%s", 1650));
me["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(fuel_left_quantity.getValue() - 1650, 10)));
me["FUEL-Left-Transfer"].setColor(0.7333,0.3803,0);
me["FUEL-Left-Transfer"].show();
} else {
me["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(fuel_left_quantity.getValue())));
me["FUEL-Left-Outer-quantity"].setText(sprintf("%s", 0));
me["FUEL-Left-Transfer"].hide();
}
me["FUEL-Center-quantity"].setText(sprintf("%s", math.round(fuel_center_quantity.getValue())));
if (fuel_right_quantity.getValue() >= 3170) {
me["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(fuel_right_quantity.getValue() - 1520, 10)));
me["FUEL-Right-Outer-quantity"].setText(sprintf("%s", 1520));
me["FUEL-Right-Transfer"].hide();
} else if (fuel_right_quantity.getValue() >= 1650) {
me["FUEL-Right-Inner-quantity"].setText(sprintf("%s", 1650));
me["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(fuel_right_quantity.getValue() - 1650, 10)));
me["FUEL-Right-Transfer"].show();
me["FUEL-Right-Transfer"].setColor(0.7333,0.3803,0);
} else {
me["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(fuel_right_quantity.getValue(), 10)));
me["FUEL-Right-Outer-quantity"].setText(sprintf("%s", 0));
me["FUEL-Right-Transfer"].hide();
}
# Hide not yet implemented features # Hide not yet implemented features
# TODO add them # TODO add them
me["FUEL-Left-blocked"].hide(); me["FUEL-Left-blocked"].hide();
@ -2374,13 +2430,6 @@ var canvas_lowerECAM_fuel = {
me["FUEL-Right-Outer-Inacc"].hide(); me["FUEL-Right-Outer-Inacc"].hide();
me["FUEL-Right-Inner-Inacc"].hide(); me["FUEL-Right-Inner-Inacc"].hide();
me["FUEL-Center-Inacc"].hide(); me["FUEL-Center-Inacc"].hide();
me["FUEL-Left-Tranfser"].hide();
me["FUEL-Right-Tranfser"].hide();
me["FUEL-Left-Outer-temp"].hide();
me["FUEL-Left-Inner-temp"].hide();
me["FUEL-Right-Outer-temp"].hide();
me["FUEL-Right-Inner-temp"].hide();
me.updateBottomStatus(); me.updateBottomStatus();
}, },
}; };

View file

@ -654,4 +654,28 @@
d="m 628.98193,436.8605 42.77869,0" d="m 628.98193,436.8605 42.77869,0"
style="fill:#001104;fill-opacity:0.32941176;stroke:#0dc04b;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" style="fill:#001104;fill-opacity:0.32941176;stroke:#0dc04b;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:transform-center-x="70.6625" /> inkscape:transform-center-x="70.6625" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75"
x="264.69138"
y="181.87299"
id="FUEL-used-1"
inkscape:label="#text5832"><tspan
sodipodi:role="line"
id="tspan5830-5-2"
x="264.69138"
y="181.87299"
style="font-size:30.00000191px;line-height:1.25;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">0000</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75"
x="682.74243"
y="181.74864"
id="FUEL-used-2"
inkscape:label="#text5832"><tspan
sodipodi:role="line"
id="tspan5830"
x="682.74243"
y="181.74864"
style="font-size:30.00000191px;line-height:1.25;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">0000</tspan></text>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

@ -1108,14 +1108,14 @@
<path <path
style="fill:none;stroke:#0dc04b;stroke-width:2.77499986;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.80000019;stroke-dasharray:none;stroke-opacity:1" style="fill:none;stroke:#0dc04b;stroke-width:2.77499986;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.80000019;stroke-dasharray:none;stroke-opacity:1"
d="m 888.74997,513.99998 15.75,-7.5 16.5,-8.25 v 17.25 15.30854 c 0,0 -1.69343,-0.68362 -19.69533,-10.2091 -11.05467,-5.84944 -12.55467,-6.59944 -12.55467,-6.59944 z" d="m 888.74997,513.99998 15.75,-7.5 16.5,-8.25 v 17.25 15.30854 c 0,0 -1.69343,-0.68362 -19.69533,-10.2091 -11.05467,-5.84944 -12.55467,-6.59944 -12.55467,-6.59944 z"
id="FUEL-Right-Tranfser" id="FUEL-Right-Transfer"
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccsc" sodipodi:nodetypes="cccccsc"
inkscape:label="#path5824-0" /> inkscape:label="#path5824-0" />
<path <path
style="fill:none;stroke:#0dc04b;stroke-width:2.77499986;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.80000019;stroke-dasharray:none;stroke-opacity:1" style="fill:none;stroke:#0dc04b;stroke-width:2.77499986;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.80000019;stroke-dasharray:none;stroke-opacity:1"
d="m 129.75,512.19144 -15.75,-7.5 -16.500003,-8.25 v 17.25 15.30854 c 0,0 1.69343,-0.68362 19.695333,-10.2091 C 128.25,512.94144 129.75,512.19144 129.75,512.19144 Z" d="m 129.75,512.19144 -15.75,-7.5 -16.500003,-8.25 v 17.25 15.30854 c 0,0 1.69343,-0.68362 19.695333,-10.2091 C 128.25,512.94144 129.75,512.19144 129.75,512.19144 Z"
id="FUEL-Left-Tranfser" id="FUEL-Left-Transfer"
inkscape:connector-curvature="0" inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccsc" sodipodi:nodetypes="cccccsc"
inkscape:label="#path5824-0" /> inkscape:label="#path5824-0" />

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View file

@ -241,6 +241,11 @@
<!-- Knob --> <!-- Knob -->
<!-- TODO add bindings for VOR, LS and ADF --> <!-- TODO add bindings for VOR, LS and ADF -->
<!-- We use a little hack to get 8.33MHz spacing working:
First we assign our current STBY freq we want to adjust to the default instrument.
Then we change the channel there.
Finally we assign the value back to out own prop.
-->
<animation> <animation>
<type>pick</type> <type>pick</type>
<object-name>radio_rot1</object-name> <object-name>radio_rot1</object-name>
@ -266,14 +271,51 @@
</equals> </equals>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[0]/vhf1-standby</property> <property>systems/radio/rmp[0]/vhf1-standby</property>
<step>0.025</step> </binding>
<min>0.0</min> <binding>
<max>1.0</max> <condition>
<resolution>0.025</resolution> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf1</value>
</equals>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf1</value>
</equals>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[0]/vhf1-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>
@ -293,14 +335,51 @@
</equals> </equals>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[0]/vhf2-standby</property> <property>systems/radio/rmp[0]/vhf2-standby</property>
<step>0.025</step> </binding>
<min>0.0</min> <binding>
<max>1.0</max> <condition>
<resolution>0.025</resolution> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf2</value>
</equals>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf2</value>
</equals>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[0]/vhf2-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>
@ -326,14 +405,63 @@
</not> </not>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[0]/vhf3-standby</property> <property>systems/radio/rmp[0]/vhf3-standby</property>
<step>0.025</step> </binding>
<resolution>0.025</resolution> <binding>
<min>0.0</min> <condition>
<max>1.0</max> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf3</value>
</equals>
<not>
<equals>
<property>systems/radio/rmp[0]/vhf3-standby</property>
<value>0</value>
</equals>
</not>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf3</value>
</equals>
<not>
<equals>
<property>systems/radio/rmp[0]/vhf3-standby</property>
<value>0</value>
</equals>
</not>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[0]/vhf3-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>
@ -409,14 +537,51 @@
</equals> </equals>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[0]/vhf1-standby</property> <property>systems/radio/rmp[0]/vhf1-standby</property>
<step>-0.025</step> </binding>
<min>0.0</min> <binding>
<max>1.0</max> <condition>
<resolution>0.025</resolution> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf1</value>
</equals>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>-1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf1</value>
</equals>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[0]/vhf1-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>
@ -436,14 +601,51 @@
</equals> </equals>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[0]/vhf2-standby</property> <property>systems/radio/rmp[0]/vhf2-standby</property>
<step>-0.025</step> </binding>
<min>0.0</min> <binding>
<max>1.0</max> <condition>
<resolution>0.025</resolution> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf2</value>
</equals>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>-1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf2</value>
</equals>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[0]/vhf2-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>
@ -469,14 +671,63 @@
</not> </not>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[0]/vhf3-standby</property> <property>systems/radio/rmp[0]/vhf3-standby</property>
<step>-0.025</step> </binding>
<min>0.0</min> <binding>
<max>1.0</max> <condition>
<resolution>0.025</resolution> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf3</value>
</equals>
<not>
<equals>
<property>systems/radio/rmp[0]/vhf3-standby</property>
<value>0</value>
</equals>
</not>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>-1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[0]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[0]/sel_chan</property>
<value type="string">vhf3</value>
</equals>
<not>
<equals>
<property>systems/radio/rmp[0]/vhf3-standby</property>
<value>0</value>
</equals>
</not>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[0]/vhf3-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>

View file

@ -241,6 +241,11 @@
<!-- Knob --> <!-- Knob -->
<!-- TODO add bindings for VOR, LS and ADF --> <!-- TODO add bindings for VOR, LS and ADF -->
<!-- We use a little hack to get 8.33MHz spacing working:
First we assign our current STBY freq we want to adjust to the default instrument.
Then we change the channel there.
Finally we assign the value back to out own prop.
-->
<animation> <animation>
<type>pick</type> <type>pick</type>
<object-name>radio_rot1</object-name> <object-name>radio_rot1</object-name>
@ -266,14 +271,51 @@
</equals> </equals>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[1]/vhf1-standby</property> <property>systems/radio/rmp[1]/vhf1-standby</property>
<step>0.025</step> </binding>
<min>0.0</min> <binding>
<max>1.0</max> <condition>
<resolution>0.025</resolution> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf1</value>
</equals>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf1</value>
</equals>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[1]/vhf1-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>
@ -293,14 +335,51 @@
</equals> </equals>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[1]/vhf2-standby</property> <property>systems/radio/rmp[1]/vhf2-standby</property>
<step>0.025</step> </binding>
<min>0.0</min> <binding>
<max>1.0</max> <condition>
<resolution>0.025</resolution> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf2</value>
</equals>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf2</value>
</equals>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[1]/vhf2-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>
@ -326,14 +405,63 @@
</not> </not>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[1]/vhf3-standby</property> <property>systems/radio/rmp[1]/vhf3-standby</property>
<step>0.025</step> </binding>
<resolution>0.025</resolution> <binding>
<min>0.0</min> <condition>
<max>1.0</max> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf3</value>
</equals>
<not>
<equals>
<property>systems/radio/rmp[1]/vhf3-standby</property>
<value>0</value>
</equals>
</not>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf3</value>
</equals>
<not>
<equals>
<property>systems/radio/rmp[1]/vhf3-standby</property>
<value>0</value>
</equals>
</not>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[1]/vhf3-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>
@ -409,14 +537,51 @@
</equals> </equals>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[1]/vhf1-standby</property> <property>systems/radio/rmp[1]/vhf1-standby</property>
<step>-0.025</step> </binding>
<min>0.0</min> <binding>
<max>1.0</max> <condition>
<resolution>0.025</resolution> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf1</value>
</equals>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>-1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf1</value>
</equals>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[1]/vhf1-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>
@ -436,14 +601,51 @@
</equals> </equals>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[1]/vhf2-standby</property> <property>systems/radio/rmp[1]/vhf2-standby</property>
<step>-0.025</step> </binding>
<min>0.0</min> <binding>
<max>1.0</max> <condition>
<resolution>0.025</resolution> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf2</value>
</equals>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>-1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf2</value>
</equals>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[1]/vhf2-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>
@ -469,14 +671,63 @@
</not> </not>
</and> </and>
</condition> </condition>
<command>property-adjust</command> <command>property-assign</command>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
<property>systems/radio/rmp[1]/vhf3-standby</property> <property>systems/radio/rmp[1]/vhf3-standby</property>
<step>-0.025</step> </binding>
<min>0.0</min> <binding>
<max>1.0</max> <condition>
<resolution>0.025</resolution> <and>
<wrap>true</wrap> <greater-than-equals>
<mask>decimal</mask> <property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf3</value>
</equals>
<not>
<equals>
<property>systems/radio/rmp[1]/vhf3-standby</property>
<value>0</value>
</equals>
</not>
</and>
</condition>
<command>property-adjust</command>
<property>instrumentation/comm[0]/frequencies/standby-channel</property>
<step>-1</step>
</binding>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/radio/rmp[1]/on</property>
<value>1</value>
</equals>
<equals>
<property>systems/radio/rmp[1]/sel_chan</property>
<value type="string">vhf3</value>
</equals>
<not>
<equals>
<property>systems/radio/rmp[1]/vhf3-standby</property>
<value>0</value>
</equals>
</not>
</and>
</condition>
<command>property-assign</command>
<property>systems/radio/rmp[1]/vhf3-standby</property>
<property>instrumentation/comm[0]/frequencies/standby-mhz</property>
</binding> </binding>
<binding> <binding>

View file

@ -926,6 +926,16 @@ var messages_priority_3 = func {
} }
var messages_priority_2 = func { var messages_priority_2 = func {
# DC EMER CONFIG
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25) {
dcEmerconfig.active = 1;
dcEmerconfigManOn.active = 1;
} else {
ECAM_controller.warningReset(dcEmerconfig);
ECAM_controller.warningReset(dcEmerconfigManOn);
}
# APU EMER SHUT DOWN
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)) { 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; apuEmerShutdown.active = 1;
} elsif (apuEmerShutdown.clearFlag == 1) { } elsif (apuEmerShutdown.clearFlag == 1) {

View file

@ -140,7 +140,7 @@ var warnings = std.Vector.new([
var essBusOnBatLGCB = warning.new(msg: "-LGCIU1 C/B (C09)..PULL", colour: "c"), var essBusOnBatLGCB = warning.new(msg: "-LGCIU1 C/B (C09)..PULL", colour: "c"),
var essBusOnBatManOn2 = warning.new(msg: "-EMER ELEC PWR...MAN ON", colour: "c"), var essBusOnBatManOn2 = warning.new(msg: "-EMER ELEC PWR...MAN ON", colour: "c"),
# ESS Bus on Bat # Emer Config
var emerconfig = warning.new(msg: "ELEC EMER CONFIG", colour: "r", aural: 0, light: 0, hasSubmsg: 1), var emerconfig = warning.new(msg: "ELEC EMER CONFIG", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
var emerconfigMinRat = warning.new(msg: "MIN RAT SPD......140 KT", colour: "c"), var emerconfigMinRat = warning.new(msg: "MIN RAT SPD......140 KT", colour: "c"),
var emerconfigGen = warning.new(msg: "-GEN 1+2....OFF THEN ON", colour: "c"), var emerconfigGen = warning.new(msg: "-GEN 1+2....OFF THEN ON", colour: "c"),
@ -161,6 +161,10 @@ var warnings = std.Vector.new([
var emerconfigProt = warning.new(msg: " (PROT LOST)", colour: "a"), var emerconfigProt = warning.new(msg: " (PROT LOST)", colour: "a"),
var emerconfigMaxSpeed = warning.new(msg: " MAX SPEED........320 KT", colour: "c"), var emerconfigMaxSpeed = warning.new(msg: " MAX SPEED........320 KT", colour: "c"),
# DC EMER CONFIG
var dcEmerconfig = warning.new(msg: "ELEC DC EMER CONFIG", colour: "a", aural: 1, light: 0, hasSubmsg: 1),
var dcEmerconfigManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
# APU shutdown # APU shutdown
var apuEmerShutdown = warning.new(msg: "APU EMER SHUT DOWN", colour: "a", aural: 1, light: 1, hasSubmsg: 1), 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"), var apuEmerShutdownMast = warning.new(msg: " -MASTER SW..........OFF", colour: "c"),

View file

@ -47,16 +47,19 @@
<comm-radio> <comm-radio>
<name>comm</name> <name>comm</name>
<number>0</number> <number>0</number>
<eight-point-three>1</eight-point-three>
</comm-radio> </comm-radio>
<comm-radio> <comm-radio>
<name>comm</name> <name>comm</name>
<number>1</number> <number>1</number>
<eight-point-three>1</eight-point-three>
</comm-radio> </comm-radio>
<comm-radio> <comm-radio>
<name>comm</name> <name>comm</name>
<number>2</number> <number>2</number>
<eight-point-three>1</eight-point-three>
</comm-radio> </comm-radio>
<dme> <dme>