Sign in to follow this  
Guest patlapi

Rotary switches and EPIC

Recommended Posts

Hi all,I've a rotary swtich and I'd like to programmed it to increment/decrement a frequence for exemple. My rotary works on buttons 4,5,6 on joystick 1. Here the code which I used with my "EPIC ISA" card.I have just bought a "EPIC USB" card and I don't manage any more to program with new EPL code ... Would somebody have an idea? Thank you:var (khz-mhz)var (current_radio) ; 5 = COMM TENS for this exemple;com radio tuning with rotary switch;this requires 3 bits and variable for each rotaryvar (last_com_tens_pos) ; variable which will check the last position of intersetvar(current_radio,5):com_plus{keyhit(equal)}:com_moins{keyhit(kbminus)}:com_pos0 {ifvar(current_radio,neq,5)call current_comifvar(last_com_tens_pos,equ,2)call com_plus else com_moinssetvar(last_com_tens_pos,0) setvar(khz-mhz,1)}:com_pos1 {ifvar(current_radio,neq,5)call current_comifvar(last_com_tens_pos,equ,0)call com_plus else com_moinssetvar(last_com_tens_pos,1) setvar(khz-mhz,1)}:com_pos2 {ifvar(current_radio,neq,5)call current_comifvar(last_com_tens_pos,equ,1)call com_plus else com_moinssetvar(last_com_tens_pos,2) setvar(khz-mhz,1)}ThanksPatrice

Share this post


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

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