Jump to content
Sign in to follow this  
JU108

Help needed - Maddog NAV MHz/kHz switching

Recommended Posts

I am struggling to set up Behringer X-touch mini to control NAV in LeonardoSH Maddog.

I am trying to set up an rotary knobs to dial up/down frequencies.

For NAV radio I want to dial up/down Mhz and when short pressing the rotary knob to switch to kHz. For NAV radios In AAO I entered 16384·(>L:NAV1_event,number) and 8192·(>L:NAV1_event,number) for rotary up/down and it changes MHz. I made the same for kHz using 16385 and 8193.

But I have no clue how to make AAO understand that when I press the button it should then change only kHz, and when poressed again only MHz, etc.

Any ideas on how to make script for this?

 

I found in the Interior.xml of the maddog following event for NAV1, if this helps.

	<PartInfo>
		<Name>NAV1_knob1</Name>
		<AnimLength>100</AnimLength>
		<Animation>
			<Parameter>
				<Code>(L:NAV1_knob1, enum)</Code>
			</Parameter>
		</Animation>
		<MouseRect>
			<Cursor>Hand</Cursor>
			<MouseFlags>LeftSingle+RightSingle+WheelUp+WheelDown</MouseFlags>
			<CallbackCode>
                (M:Event) 'WheelUp' scmi 0 == if{ 16384 0 + (&gt;L:NAV1_event,number) }
                (M:Event) 'WheelDown' scmi 0 == if{ 8192 0 + (&gt;L:NAV1_event,number) }
                (M:Event) 'LeftSingle' scmi 0 == if{ 8192 0 + (&gt;L:NAV1_event,number) }
                (M:Event) 'RightSingle' scmi 0 == if{ 16384 0 + (&gt;L:NAV1_event,number) }
            </CallbackCode>
		</MouseRect>
	</PartInfo>
	<PartInfo>
		<Name>NAV1_knob2</Name>
		<AnimLength>100</AnimLength>
		<Animation>
			<Parameter>
				<Code>(L:NAV1_knob2, enum)</Code>
			</Parameter>
		</Animation>
		<MouseRect>
			<Cursor>Hand</Cursor>
			<MouseFlags>LeftSingle+RightSingle+WheelUp+WheelDown</MouseFlags>
			<CallbackCode>
                (M:Event) 'WheelUp' scmi 0 == if{ 16384 1 + (&gt;L:NAV1_event,number) }
                (M:Event) 'WheelDown' scmi 0 == if{ 8192 1 + (&gt;L:NAV1_event,number) }
                (M:Event) 'LeftSingle' scmi 0 == if{ 8192 1 + (&gt;L:NAV1_event,number) }
                (M:Event) 'RightSingle' scmi 0 == if{ 16384 1 + (&gt;L:NAV1_event,number) }
            </CallbackCode>
		</MouseRect>
	</PartInfo>

 

 

Share this post


Link to post
Share on other sites
48 minutes ago, JU108 said:

Any ideas on how to make script for this?

That is what the Combo feature is for. You create four (4) assignments for that rotary encoder, MHz Up/Down and kHz up/down, using the scripts that you have. Then you use the "button" functionality of the encoder as Combo in all four, in "toggle" mode. And for the two "kHz" assignments you must set the Combo to "suppress button event". Then clicking the encoder will switch between the MHz actions and the kHz actions.

Edited by Lorby_SI
  • Like 1

LORBY-SI

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...