Sign in to follow this  
phjvh

switch with 5 positions

Recommended Posts

Hi,I am working on a nd with 5 modes I have some problems a switch for chaning between the modes.My plan that I use L:ND Switch, enum) X == for each mode.My problem is the click event. I have looked at the code of the autobreak of the 747 but it is specific.So if anyone could please explain how I can create a click I would be very thankful.BrgdsEugen

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Not tested, but something like this:(*up*)(L:ND Switch, enum) 4 != if{ (L:ND Switch, enum) 1 + (>L:ND Switch, enum) }(*down*)(L:ND Switch, enum) 0 != if{ (L:ND Switch, enum) 1 - (>L:ND Switch, enum) }Replace > with & g t ;

Share this post


Link to post
Share on other sites

Eugen,I use this one for 3 positions, more should be no problem:1(L:Nav Display Switch, enum) 0 == if{ 0 (>L:Nav Display Switch, enum) } els{ 0 (>L:Nav Display Switch, enum) } 1 (>K:TOGGLE_AFTERBURNER1)2(L:Nav Display Switch, enum) 1 == if{ 0 (>L:Nav Display Switch, enum) } els{ 1 (>L:Nav Display Switch, enum) } 1 (>K:TOGGLE_AFTERBURNER1)3(L:Nav Display Switch, enum) 2 == if{ 0 (>L:Nav Display Switch, enum) } els{ 2 (>L:Nav Display Switch, enum) } 1 (>K:TOGGLE_AFTERBURNER1)4etc.Janhttp://community.webshots.com/storage/1/v4...75aouncN_th.jpg

Share this post


Link to post
Share on other sites

Karl, Jan,Thanks for your reply I am real rockie on this. Karl your solution worked as wanted :-)Jan I think I need a detailed description about this. The afterburner is triggered to get some sound ?the first part if true assign a value of 0 to the L var ? if not it assigns 0 ??(L:Nav Display Switch, enum) 0 == if{ 0 (>L:Nav Display Switch, enum) } els{ 0 (>L:Nav Display Switch, enum) } ) )The first part assigns zero to L var if tru if not assigns 1 to it?Click>(L:Nav Display Switch, enum) 1 == if{ 0 (>L:Nav Display Switch, enum) } els{ 1 (>L:Nav Display Switch, enum) } )The first part assigns zero to L var if tru if not assigns 2 to it?(L:Nav Display Switch, enum) 2 == if{ 0 (>L:Nav Display Switch, enum) } els{ 2 (>L:Nav Display Switch, enum) } )I have enclosed some test code and an image of the switch What I wonder is how do I increase or decrese the L:Nav var ? (L:Nav Display Switch, enum) 80"/> 80"/> 80"/> 80"/> 80"/> 80"/> I cant see how I subsitute the below code with the above ? Should I have 5 click event for increasing and 5 for decreasing ? brgdsEugen

Share this post


Link to post
Share on other sites

Eugen,The Afterburner1 means: you hear a click.My switch gives 3 different ND's, see picture.First position is N(bitmap)Second NE and third E.At Startup default pos. is N.When i click in the N position, nothing happens; Value=0, Arc mode.When i click in the NE position, i get Rose mode, Value=1.Clicking again here gives Value=0.When i click in the E position, i get a blank screen, Value=2, Then i can choose for FMC, Radar and GPS (other switches).Clicking again here gives Value=0; Clicking NE gives Value=1 etc.Here is the complete code:(L:Nav Display Switch, enum)Nav Display Switch, Arc(L:Nav Display Switch, enum) 0 == if{ 0 (>L:Nav Display Switch, enum) } els{ 0 (>L:Nav Display Switch, enum) } 1 (>K:TOGGLE_AFTERBURNER1)Nav Display Switch, Rose(L:Nav Display Switch, enum) 1 == if{ 0 (>L:Nav Display Switch, enum) } els{ 1 (>L:Nav Display Switch, enum) } 1 (>K:TOGGLE_AFTERBURNER1)Intentionally Left Blank(L:Nav Display Switch, enum) 2 == if{ 0 (>L:Nav Display Switch, enum) } els{ 2 (>L:Nav Display Switch, enum) } 1 (>K:TOGGLE_AFTERBURNER1)When you want to use the Autobrake Clickevent, you indeed need 4 times (>K:INCREASE_AUTOBRAKE_CONTROL) to reach position Max.Janhttp://community.webshots.com/storage/1/v4...75aouncN_th.jpg

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