Many thanks Josh. I finally managed to understand the model and get the dialog and panel buttons synchronised. One of the challenges is that the aircraft uses several modules from other aircraft, which results in confusing labels (e.g. /controls/armament/master-arm refers to the HDG lever). Anyway, I've got it to work for the most part.
As a aside from the original topic (for anyone who might know), I have a separate question. In animating the vertical speed, the following code is used for descents:
- Code: Select all
<!-- VS minus -->
<animation>
<type>select</type>
<object-name>VSmin</object-name>
<condition>
<less-than>
<property>/it-autoflight/input/vs</property>
<value>0</value>
</less-than>
</condition>
</animation>
<!-- VS setting decrease -->
<animation>
<type>pick</type>
<object-name>VSSETMINUS</object-name>
<visible>false</visible>
<action>
<name>decrease</name>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-adjust</command>
<property>/it-autoflight/input/vs</property>
<step>-100</step>
<min>-2000</min>
<max>2000</max>
</binding>
</action>
</animation>
There is corresponding code for increasing V/S. When the plane is ascending, then the the panel display for V/S matches that in the dialog. However, when it is descending, the panel display shows (vs - 10000), where "vs" is the absolute of the V/S value. For example, if the V/S is -200, it will show -9800. This is just a animation problem - it does not affect the flight at all. Does anyone have a suggestion on what I am doing wrong?
Thanks.