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

View file

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

View file

@ -203,7 +203,6 @@ setlistener("/sim/signals/fdm-initialized", func {
systems.fuel_init(); systems.fuel_init();
systems.fire_init(); systems.fire_init();
systems.eng_init(); systems.eng_init();
systems.tray_init();
fmgc.APinit(); fmgc.APinit();
librariesLoop.start(); librariesLoop.start();
fmgc.FMGCinit(); 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); setprop("/systems/acconfig/libraries-loaded", 1);

View file

@ -1 +1 @@
2017 2018