A3XX: Fix light power sources, and fix ON BATT light not working without main power

This commit is contained in:
Joshua Davidson 2017-12-29 20:00:39 -05:00
parent 70765a89f0
commit 154fcfea40
4 changed files with 406 additions and 1030 deletions

View file

@ -408,16 +408,10 @@
<object-name>wpt_led</object-name>
<object-name>wpt_led.001</object-name>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
</animation>
@ -471,16 +465,10 @@
<repeatable type="bool">true</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -503,16 +491,10 @@
<repeatable type="bool">true</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -548,16 +530,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -783,16 +759,10 @@
<button>0</button>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -816,16 +786,10 @@
<button>0</button>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -849,16 +813,10 @@
<button>0</button>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -921,16 +879,10 @@
<button>0</button>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>modes/cpt-du-xfr</property>
@ -1026,16 +978,10 @@
<button>0</button>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>modes/fo-du-xfr</property>
@ -1172,16 +1118,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1198,16 +1138,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1224,16 +1158,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1250,16 +1178,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1276,16 +1198,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1302,16 +1218,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1328,16 +1238,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1354,16 +1258,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1380,16 +1278,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1406,16 +1298,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1432,16 +1318,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1458,16 +1338,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-assign</command>
<property>ECAM/Lower/page</property>
@ -1583,16 +1457,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -1618,16 +1486,10 @@
<property>modes/altimeter/std</property>
<value>0</value>
</equals>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</and>
</condition>
</binding>
@ -1646,16 +1508,10 @@
<property>modes/altimeter/std</property>
<value>0</value>
</equals>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</and>
</condition>
</binding>
@ -1686,16 +1542,10 @@
<property>modes/altimeter/std</property>
<value>0</value>
</equals>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</and>
</condition>
</binding>
@ -1714,16 +1564,10 @@
<property>modes/altimeter/std</property>
<value>0</value>
</equals>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</and>
</condition>
</binding>
@ -2078,16 +1922,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>it-autoflight/input/fd1</property>
@ -2119,16 +1957,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>modes/pfd/ILS1</property>
@ -2160,16 +1992,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>modes/pfd/ILS2</property>
@ -2201,16 +2027,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>it-autoflight/input/fd2</property>
@ -2243,16 +2063,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -2291,16 +2105,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -2339,16 +2147,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -2387,16 +2189,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -2435,16 +2231,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -2483,16 +2273,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -2531,16 +2315,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -2579,16 +2357,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -2627,16 +2399,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>
@ -2675,16 +2441,10 @@
<repeatable type="bool">false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>

File diff suppressed because it is too large Load diff

View file

@ -93,7 +93,7 @@ var ADIRS = {
if (ac1 >= 110 or ac2 >= 110) {
pwr_src = "AC";
} else if (batt1_amps >= 120 or batt2_amps >= 120) {
} else if ((batt1_amps >= 120 or batt2_amps >= 120) and (getprop("/controls/adirs/ir[0]/knob") != 0 or getprop("/controls/adirs/ir[1]/knob") != 0 or getprop("/controls/adirs/ir[2]/knob") != 0)) {
pwr_src = "BATT";
} else {
pwr_src = "XX";

View file

@ -1 +1 @@
4202
4203