Sign in to follow this  
ifrevets

Rotary Switch Code in EPICenter

Recommended Posts

Hi AllI want to use 12 position mechanical rotary switches for my avionics panel. They are wired for three buttons but I don't know how to program them. I got this sample code for a Rotary Switch in EPIC but it will not compile. Can anyone tell me how to get what I am trying to do.#define FASTSCAN 0definemodule(0,FASTSCAN,0,7):commplus{ keyhit(EQUAL);}:commminus{ keyhit(KBMINUS);}rvar (last_pos,0)rvar (last_pos,1)rvar (last_pos,2) :comm_pos0{ ifvar(last_pos,EQU,2) call commplus else commminus setvar(last_pos,0) }:comm_pos1{ ifvar(last_pos,EQU,0) call commplus else commminus setvar(last_pos,1) }:comm_pos2{ ifvar(last_pos,EQU,1) call commplus else commminus setvar(last_pos,2) }definebutton(16,on,comm_pos0)definebutton(17,on,comm_pos1)definebutton(18,on,comm_pos2)Any help on this would be much appreciated.Best regards,Steve K. (ifrevets)

Share this post


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

Hi Arthur PratherThank you for the information. I will give it a try.Regards,Steve K (ifrevets)

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