1
0
Fork 0

Aircraft/Generic/DualControl/Instruments/VHF-22: Converted to knob animations and added panel lighting.

This commit is contained in:
Anders Gidenstam 2013-05-18 23:57:19 +02:00
parent 3929e8d091
commit 99a2d02c48
4 changed files with 127 additions and 181 deletions

View file

@ -17,6 +17,7 @@ NOTE: ctl22.nas MUST be loaded as Nasal module VHF22.
<params>
<serviceable>instrumentation/comm[0]/serviceable</serviceable>
<electrical-supply>systems/electrical/outputs/comm[0]</electrical-supply>
<volume-norm>instrumentation/comm[0]/volume</volume-norm>
<selected-freq-mhz>instrumentation/comm[0]/frequencies/selected-mhz</selected-freq-mhz>
<standby-freq-mhz>instrumentation/comm[0]/frequencies/standby-mhz</standby-freq-mhz>
<swap-script>VHF22.swap(0);</swap-script>
@ -24,6 +25,8 @@ NOTE: ctl22.nas MUST be loaded as Nasal module VHF22.
<small-dec-script>VHF22.adjust_frequency(0, -0.025);</small-dec-script>
<big-inc-script>VHF22.adjust_frequency(0, 1.0);</big-inc-script>
<big-dec-script>VHF22.adjust_frequency(0, -1.0);</big-dec-script>
<lighting-norm>controls/lighting/panel-norm</lighting-norm>
</params>
<path>ctl22.ac</path>
@ -38,10 +41,13 @@ NOTE: ctl22.nas MUST be loaded as Nasal module VHF22.
<object-name>freq.005</object-name>
<object-name>freq.006</object-name>
<condition>
<greater-than>
<property alias="../../../../params/electrical-supply"/>
<value>1</value>
</greater-than>
<and>
<property alias="../../../../params/serviceable"/>
<greater-than>
<property alias="../../../../../params/electrical-supply"/>
<value>1</value>
</greater-than>
</and>
</condition>
</animation>
@ -55,10 +61,13 @@ NOTE: ctl22.nas MUST be loaded as Nasal module VHF22.
<object-name>stby.005</object-name>
<object-name>stby.006</object-name>
<condition>
<greater-than>
<property alias="../../../../params/electrical-supply"/>
<value>1</value>
</greater-than>
<and>
<property alias="../../../../params/serviceable"/>
<greater-than>
<property alias="../../../../../params/electrical-supply"/>
<value>1</value>
</greater-than>
</and>
</condition>
</animation>
@ -66,31 +75,42 @@ NOTE: ctl22.nas MUST be loaded as Nasal module VHF22.
<type>select</type>
<object-name>mem.annun</object-name>
<condition>
<greater-than>
<property alias="../../../../params/electrical-supply"/>
<value>1</value>
</greater-than>
<and>
<property alias="../../../../params/serviceable"/>
<greater-than>
<property alias="../../../../../params/electrical-supply"/>
<value>1</value>
</greater-than>
</and>
</condition>
</animation>
<animation>
<type>rotate</type>
<object-name>CTL-22.pwr</object-name>
<property alias="../../params/serviceable"/>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
</interpolation>
<center>
<x-m>0.0</x-m>
<y-m>-0.014</y-m>
<z-m>-0.018</z-m>
</center>
<axis>
<x>-1</x>
<y>0</y>
<z>0</z>
</axis>
<type>select</type>
<object-name>CTL-22.xfr</object-name>
<condition>
<and>
<property alias="../../../../params/serviceable"/>
<greater-than>
<property alias="../../../../../params/electrical-supply"/>
<value>1</value>
</greater-than>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>CTL-22.mem</object-name>
<condition>
<and>
<property alias="../../../../params/serviceable"/>
<greater-than>
<property alias="../../../../../params/electrical-supply"/>
<value>1</value>
</greater-than>
</and>
</condition>
</animation>
<!-- Active Frequency -->
@ -279,109 +299,117 @@ NOTE: ctl22.nas MUST be loaded as Nasal module VHF22.
</animation>
<animation>
<type>pick</type>
<object-name>pwr.off</object-name>
<type>knob</type>
<object-name>CTL-22.pwr</object-name>
<property alias="../../params/serviceable"/>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>1.0</ind><dep>30</dep></entry>
</interpolation>
<center>
<x-m>0.0</x-m>
<y-m>-0.014</y-m>
<z-m>-0.018</z-m>
</center>
<axis>
<x>-1</x>
<y>0</y>
<z>0</z>
</axis>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<command>property-toggle</command>
<property alias="../../../../params/serviceable"/>
<value>false</value>
<value type="bool">0</value>
<value type="bool">1</value>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>pwr.on</object-name>
<type>knob</type>
<object-name>CTL-22.vol</object-name>
<property alias="../../params/volume-norm"/>
<factor>300</factor>
<center>
<x-m>0.0</x-m>
<y-m>-0.0138</y-m>
<z-m>-0.0183</z-m>
</center>
<axis>
<x>-1</x>
<y>0</y>
<z>0</z>
</axis>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property alias="../../../../params/serviceable"/>
<value>true</value>
<command>property-adjust</command>
<property alias="../../../../params/volume-norm"/>
<factor type="double">0.02</factor>
<min type="double">0.0</min>
<max type="double">1.0</max>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<type>knob</type>
<object-name>freq.knob.kHz</object-name>
<action>
<button>0</button>
<repeatable>true</repeatable>
<interval-sec>0.2</interval-sec>
<increase>
<binding>
<command>nasal</command>
<script alias="../../../../params/small-inc-script"/>
</binding>
</action>
<action>
<button>1</button>
<repeatable>true</repeatable>
<interval-sec>0.2</interval-sec>
</increase>
<decrease>
<binding>
<command>nasal</command>
<script alias="../../../../params/small-dec-script"/>
</binding>
</action>
<action>
<button>3</button>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script alias="../../../../params/small-dec-script"/>
</binding>
</action>
<action>
<button>4</button>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script alias="../../../../params/small-inc-script"/>
</binding>
</action>
</decrease>
</animation>
<animation>
<type>pick</type>
<type>knob</type>
<object-name>freq.knob.MHz</object-name>
<action>
<button>0</button>
<repeatable>true</repeatable>
<interval-sec>0.2</interval-sec>
<increase>
<binding>
<command>nasal</command>
<script alias="../../../../params/big-inc-script"/>
</binding>
</action>
<action>
<button>1</button>
<repeatable>true</repeatable>
<interval-sec>0.2</interval-sec>
</increase>
<decrease>
<binding>
<command>nasal</command>
<script alias="../../../../params/big-dec-script"/>
</binding>
</action>
<action>
<button>3</button>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script alias="../../../../params/big-dec-script"/>
</binding>
</action>
<action>
<button>4</button>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script alias="../../../../params/big-inc-script"/>
</binding>
</action>
</decrease>
</animation>
<animation>
<type>material</type>
<object-name>freq.knob.kHz</object-name>
<object-name>freq.knob.MHz</object-name>
<object-name>CTL-22.vol</object-name>
<object-name>act.btn</object-name>
<object-name>sto.btn</object-name>
<object-name>test.btn</object-name>
<emission>
<factor-prop alias="../../../params/lighting-norm"/>
<red>0.4</red>
<green>0.4</green>
<blue>0.4</blue>
</emission>
</animation>
<animation>
<type>material</type>
<object-name>CTL-22</object-name>
<emission>
<factor-prop alias="../../../params/lighting-norm"/>
<red>0.15</red>
<green>0.15</green>
<blue>0.15</blue>
</emission>
</animation>
</PropertyList>

View file

@ -16,6 +16,7 @@ NOTE: ctl22.nas MUST be loaded as Nasal module VHF22.
<params>
<serviceable>instrumentation/comm[0]/serviceable</serviceable>
<electrical-supply>systems/electrical/outputs/comm[0]</electrical-supply>
<volume-norm>instrumentation/comm[0]/volume</volume-norm>
<selected-freq-mhz>instrumentation/comm[0]/frequencies/selected-mhz</selected-freq-mhz>
<standby-freq-mhz>instrumentation/comm[0]/frequencies/standby-mhz</standby-freq-mhz>
<swap-script>VHF22.swap(0);</swap-script>

View file

@ -16,6 +16,7 @@ NOTE: ctl22.nas MUST be loaded as Nasal module VHF22.
<params>
<serviceable>instrumentation/comm[1]/serviceable</serviceable>
<electrical-supply>systems/electrical/outputs/comm[1]</electrical-supply>
<volume-norm>instrumentation/comm[1]/volume</volume-norm>
<selected-freq-mhz>instrumentation/comm[1]/frequencies/selected-mhz</selected-freq-mhz>
<standby-freq-mhz>instrumentation/comm[1]/frequencies/standby-mhz</standby-freq-mhz>
<swap-script>VHF22.swap(1);</swap-script>

View file

@ -4,7 +4,7 @@ MATERIAL "DefaultWhite.001" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0.5 0.5 0.5 shi
MATERIAL "dimlit" rgb 1 1 1 amb 1 1 1 emis 0.5 0.5 0.5 spec 0.5 0.5 0.5 shi 64 trans 0
MATERIAL "lit" rgb 1 1 1 amb 1 1 1 emis 1 1 1 spec 0.5 0.5 0.5 shi 64 trans 0
OBJECT world
kids 31
kids 27
OBJECT poly
name "CTL-22"
data 4
@ -1176,27 +1176,6 @@ refs 4
1 0.933840274811 0.0642324090004
kids 0
OBJECT poly
name "freq.dwn"
data 8
Mesh.014
texture "ctl-22.png"
texrep 1 1
crease 30.000000
numvert 4
0.003022 -0.006662 -0.017042
0.003022 -0.02423 -0.017042
0.003022 -0.006662 -0.008258
0.003022 -0.02423 -0.008258
numsurf 1
SURF 0x00
mat 1
refs 4
0 0.628464281559 0.464825630188
2 0.508616089821 0.464825630188
3 0.508616030216 0.2251290977
1 0.628464281559 0.2251290977
kids 0
OBJECT poly
name "freq.knob.MHz"
data 8
Mesh.015
@ -1730,27 +1709,6 @@ refs 4
15 0.158409923315 0.71993303299
kids 0
OBJECT poly
name "freq.up"
data 8
Mesh.016
texture "ctl-22.png"
texrep 1 1
crease 30.000000
numvert 4
0.003022 -0.006662 -0.017042
0.003022 -0.02423 -0.017042
0.003022 -0.02423 -0.025826
0.003022 -0.006662 -0.025826
numsurf 1
SURF 0x00
mat 1
refs 4
3 0.748312532902 0.464825630188
0 0.628464281559 0.464825630188
1 0.628464281559 0.2251290977
2 0.748312532902 0.2251290977
kids 0
OBJECT poly
name "mem.annun"
data 8
Mesh.017
@ -1772,48 +1730,6 @@ refs 4
1 0.135480225086 0.035107113421
kids 0
OBJECT poly
name "pwr.off"
data 8
Mesh.018
texture "ctl-22.png"
texrep 1 1
crease 30.000000
numvert 4
0.002944 -0.026036 0.021504
0.002944 -0.010631 0.021504
0.002944 -0.026036 0.013802
0.002944 -0.010631 0.013802
numsurf 1
SURF 0x00
mat 1
refs 4
0 0.114473424852 0.201592057943
2 0.220019072294 0.201592057943
3 0.220019072294 0.412683337927
1 0.114473424852 0.412683337927
kids 0
OBJECT poly
name "pwr.on"
data 8
Mesh.019
texture "ctl-22.png"
texrep 1 1
crease 30.000000
numvert 4
0.002944 -0.010631 0.013802
0.002944 -0.026036 0.013802
0.002944 -0.026036 0.0061
0.002944 -0.010632 0.0061
numsurf 1
SURF 0x00
mat 1
refs 4
3 0.325564712286 0.412683337927
0 0.220019072294 0.412683337927
1 0.220019072294 0.201592057943
2 0.325564712286 0.201592057943
kids 0
OBJECT poly
name "stby.001"
data 8
Mesh.020