I want to create a frequency range selector that works in the following manner :
position 0 : from 100 to 190 khz
position 1 : from 190 to 420 Khz
position 2 : from 420 to 970 Khz
position 3 : from 970 to 1700 Khz
If the frequency is greater than 190 kHz when the switch is set to 0, it automatically returns to 100 kHz;
If the frequency is greater than 420 kHz when the switch is set to 1, it automatically returns to 191 kHz
And so on.
I have tried this code but it is not working either with EventID "ADF_SET" nor with "ADF_COMPLETE_SET"
Could you help me ?
position 0 : from 100 to 190 khz
position 1 : from 190 to 420 Khz
position 2 : from 420 to 970 Khz
position 3 : from 970 to 1700 Khz
If the frequency is greater than 190 kHz when the switch is set to 0, it automatically returns to 100 kHz;
If the frequency is greater than 420 kHz when the switch is set to 1, it automatically returns to 191 kHz
And so on.
I have tried this code but it is not working either with EventID "ADF_SET" nor with "ADF_COMPLETE_SET"
Code:
<PartInfo>
<Name>00-NORD_ADF1_Plages_Frequences</Name>
<AnimLength>30</AnimLength>
<Animation>
<Parameter>
<Code> (L:ADF1_Plages_Frequences,enum) 10 *
</Code>
<Lag>100</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<MouseFlags>WheelUp+WheelDown+LeftSingle+RightSingle</MouseFlags> <TooltipText>Selecteur Plages de Frequences</TooltipText>
<CallbackCode>
<!-- DECREASE -->
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:ADF1_Plages_Frequences,enum) -- 0 max (>L:ADF1_Plages_Frequences,enum) }
(M:Event) 'WheelDown' scmp 0 ==
if{ (L:ADF1_Plages_Frequences,enum) -- 0 max (>L:ADF1_Plages_Frequences,enum) }
<!-- INCREASE -->
(M:Event) 'LeftSingle' scmp 0 ==
if{ (L:ADF1_Plages_Frequences,enum) ++ 3 min (>L:ADF1_Plages_Frequences,enum) }
(M:Event) 'WheelUp' scmp 0 ==
if{ (L:ADF1_Plages_Frequences,enum) ++ 3 min (>L:ADF1_Plages_Frequences,enum) }
<!-- EVALUATE SWITCH POSITION AND TAKE ACTION -->
[COLOR="Red"](L:ADF1_Plages_Frequences,enum) 0 ==
(A:ADF ACTIVE FREQUENCY:1, KHz) 190 > and
if{ 100 (>K:ADF_SET) }[/COLOR]
</CallbackCode>
</MouseRect>
</PartInfo>
Could you help me ?
Last edited:



