Jump to content
Sign in to follow this  
taguilo

Momentary Switch Question...

Recommended Posts

Guest Ionizeyou

Is it possible to create a three way momentary switch that will stay in place as long as you're holding a mouse click to it, but when you release, the switch will return to it's center detent? I have a momentary switch set up already for trim adjustments, but it repeats when holding... I'd like it to stay in the positive or negative positions whith a "click hold" and then return to center when released. Anyone mastered this one yet? Here's an example of what I have now:(L:Stab trim switch, enum)(P:Absolute time, seconds) (L:Stab trim timer, seconds) > if{ 0 (>L:Stab trim switch, enum) }(>K:ELEV_TRIM_DN) -1 (>L:Stab trim switch, enum) (P:Absolute time, seconds) 0.75 + (L:Stab trim timer, seconds)(>K:ELEV_TRIM_UP) 1 (>L:Stab trim switch, enum) (P:Absolute time, seconds) 0.75 + (L:Stab trim timer, seconds)

Share this post


Link to post
Share on other sites

Kevin,Didn't check, but there are mouse-events something like "Leftpress/Leftrelease" etc. and these should work.Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest Ionizeyou

You ever had a moment when you can't see the forest for the trees right in front of your face? lol...I rarely use those except for the throttle controls and forgot about them in this instance. Thanks Jan... I'll look into this some more.

Share this post


Link to post
Share on other sites

Hi,Here you have an example code from my 757 panel project:AILERON LEFT/RIGHT TRIM(L:Aileron Tim Pos,enum) (M:Event) 'LeftSingle' scmp 0 == if{ -1 (>L:Aileron Tim Pos,enum (>K:AILERON_TRIM_LEFT) } (M:Event) 'Leave' scmp 0 == if{ 0 (>L:Aileron Tim Pos,enum) } (M:Event) 'LeftSingle' scmp 0 == if{ 1 (>L:Aileron Tim Pos,enum) (>K:AILERON_TRIM_RIGHT) } (M:Event) 'Leave' scmp 0 == if{ 0 (>L:Aileron Tim Pos,enum) } Hope this helpsTom

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...