- Messages
- 3
- Country
I wrote the following code in the model.xml for a knob to change the adf frequency:
<Animation name="li2adf1m" guid="1e165643-8f45-4212-76d7-ace13e4fb81c" type="Sim" typeParam="AutoPlay" typeParam2="li2adf1m" length="360"/>
<PartInfo>
<Name>li2adf1m</Name>
<Animation>
<Parameter>
<Code>
(L:adf1, number)
</Code>
<Lag>500</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<MouseFlags>WheelUp+WheelDown+LeftSingle</MouseFlags>
<CallbackCode>
(M:Event) 'WheelUp' scmi 0 == if{ 1 (>K:ADF_10_INC) (L:adf1, number) 1 + 100 min (>L:adf1, number) }
(M:Event) 'WheelDown' scmi 0 == if{ 1 (>K:ADF_10_DEC) (L:adf1, number) 1 - 0 max (>L:adf1, number) }
</CallbackCode>
</MouseRect>
</PartInfo>
The knob turns but the frequency doesn’t change.
(The event is listed in MSFS SDK.)
Is there something I am doing wrong or do these codes just not work in MSFS?
thanks in advance!
<Animation name="li2adf1m" guid="1e165643-8f45-4212-76d7-ace13e4fb81c" type="Sim" typeParam="AutoPlay" typeParam2="li2adf1m" length="360"/>
<PartInfo>
<Name>li2adf1m</Name>
<Animation>
<Parameter>
<Code>
(L:adf1, number)
</Code>
<Lag>500</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<MouseFlags>WheelUp+WheelDown+LeftSingle</MouseFlags>
<CallbackCode>
(M:Event) 'WheelUp' scmi 0 == if{ 1 (>K:ADF_10_INC) (L:adf1, number) 1 + 100 min (>L:adf1, number) }
(M:Event) 'WheelDown' scmi 0 == if{ 1 (>K:ADF_10_DEC) (L:adf1, number) 1 - 0 max (>L:adf1, number) }
</CallbackCode>
</MouseRect>
</PartInfo>
The knob turns but the frequency doesn’t change.
(The event is listed in MSFS SDK.)
Is there something I am doing wrong or do these codes just not work in MSFS?
thanks in advance!