A3XX: Fix and simplify trays

This commit is contained in:
Joshua Davidson 2017-10-03 15:08:31 -04:00
parent 0d156a89cb
commit cfb389b6b5
4 changed files with 35 additions and 41 deletions

View file

@ -586,6 +586,10 @@
<annun-test>0</annun-test>
<windowprobeheat type="double">0.5</windowprobeheat>
</switches>
<tray n="0">
<lefttrayext type="double">0</lefttrayext>
<righttrayext type="double">0</righttrayext>
</tray>
</controls>
<engines>
@ -1183,7 +1187,6 @@
<file>Aircraft/IDG-A32X/Nasal/engines.nas</file>
<file>Aircraft/IDG-A32X/Nasal/ADIRS.nas</file>
<file>Aircraft/IDG-A32X/Nasal/fire.nas</file>
<file>Aircraft/IDG-A32X/Nasal/trays.nas</file>
</systems>
<thrust>
<file>Aircraft/IDG-A32X/Nasal/fadec-common.nas</file>

View file

@ -5399,7 +5399,7 @@
<type>translate</type>
<object-name>tray</object-name>
<object-name>cylinder01</object-name>
<property>/controls/tray/lefttrayext</property>
<property>controls/tray/lefttrayext</property>
<interpolation>
<entry><ind>0</ind><dep> 0</dep></entry>
<entry><ind>0.5</ind><dep>0.160</dep></entry>
@ -5416,7 +5416,7 @@
<type>translate</type>
<object-name>tray.001</object-name>
<object-name>cylinder01.001</object-name>
<property>/controls/tray/righttrayext</property>
<property>controls/tray/righttrayext</property>
<interpolation>
<entry><ind>0</ind><dep> 0</dep></entry>
<entry><ind>0.5</ind><dep>0.160</dep></entry>
@ -5433,7 +5433,7 @@
<type>translate</type>
<object-name>tray</object-name>
<object-name>cylinder01</object-name>
<property>/controls/tray/lefttrayext</property>
<property>controls/tray/lefttrayext</property>
<interpolation>
<entry><ind>0</ind><dep> 0</dep></entry>
<entry><ind>0.5</ind><dep>0.045</dep></entry>
@ -5450,7 +5450,7 @@
<type>translate</type>
<object-name>tray.001</object-name>
<object-name>cylinder01.001</object-name>
<property>/controls/tray/righttrayext</property>
<property>controls/tray/righttrayext</property>
<interpolation>
<entry><ind>0</ind><dep> 0</dep></entry>
<entry><ind>0.5</ind><dep>0.045</dep></entry>
@ -5466,7 +5466,7 @@
<animation>
<type>rotate</type>
<object-name>tray</object-name>
<property>/controls/tray/lefttrayext</property>
<property>controls/tray/lefttrayext</property>
<interpolation>
<entry><ind>0</ind><dep> 0</dep></entry>
<entry><ind>0.4</ind><dep>0</dep></entry>
@ -5488,7 +5488,7 @@
<animation>
<type>rotate</type>
<object-name>cylinder01.002</object-name>
<property>/controls/tray/lefttrayext</property>
<property>controls/tray/lefttrayext</property>
<interpolation>
<entry><ind>0</ind><dep> 0</dep></entry>
<entry><ind>0.4</ind><dep>0</dep></entry>
@ -5510,7 +5510,7 @@
<animation>
<type>rotate</type>
<object-name>tray.001</object-name>
<property>/controls/tray/righttrayext</property>
<property>controls/tray/righttrayext</property>
<interpolation>
<entry><ind>0</ind><dep> 0</dep></entry>
<entry><ind>0.4</ind><dep>0</dep></entry>
@ -5532,7 +5532,7 @@
<animation>
<type>rotate</type>
<object-name>cylinder01.001</object-name>
<property>/controls/tray/righttrayext</property>
<property>controls/tray/righttrayext</property>
<interpolation>
<entry><ind>0</ind><dep> 0</dep></entry>
<entry><ind>0.4</ind><dep>0</dep></entry>
@ -5558,21 +5558,8 @@
<action>
<button>0</button>
<binding>
<command>property-cycle</command>
<property>/controls/tray/cmdL</property>
<value>0</value>
<value>0.5</value>
<value>1</value>
</binding>
</action>
<action>
<button>1</button>
<binding>
<command>property-cycle</command>
<property>/controls/tray/cmdL</property>
<value>1</value>
<value>0.5</value>
<value>0</value>
<command>nasal</command>
<script>libraries.lTray();</script>
</binding>
</action>
</animation>
@ -5584,21 +5571,8 @@
<action>
<button>0</button>
<binding>
<command>property-cycle</command>
<property>/controls/tray/cmdR</property>
<value>0</value>
<value>0.5</value>
<value>1</value>
</binding>
</action>
<action>
<button>1</button>
<binding>
<command>property-cycle</command>
<property>/controls/tray/cmdR</property>
<value>1</value>
<value>0.5</value>
<value>0</value>
<command>nasal</command>
<script>libraries.rTray();</script>
</binding>
</action>
</animation>

View file

@ -203,7 +203,6 @@ setlistener("/sim/signals/fdm-initialized", func {
systems.fuel_init();
systems.fire_init();
systems.eng_init();
systems.tray_init();
fmgc.APinit();
librariesLoop.start();
fmgc.FMGCinit();
@ -429,4 +428,22 @@ var noseLoop = maketimer(0.1, func {
}
});
var lTray = func {
var lTrayCMD = getprop("/controls/tray/lefttrayext");
if (lTrayCMD < 1) {
interpolate("/controls/tray/lefttrayext", 1, 1);
} else {
interpolate("/controls/tray/lefttrayext", 0, 1);
}
}
var rTray = func {
var rTrayCMD = getprop("/controls/tray/righttrayext");
if (rTrayCMD < 1) {
interpolate("/controls/tray/righttrayext", 1, 1);
} else {
interpolate("/controls/tray/righttrayext", 0, 1);
}
}
setprop("/systems/acconfig/libraries-loaded", 1);

View file

@ -1 +1 @@
2017
2018