Hi everyone, (sorry this is repost) think previous post was deleted and now got lost some where.
I'm very new to the forum, so please forgive me if I open a can of worms here and this have already been discussed to death.
I've read some of the pass posts and topics of buttons, and Pete wonderful guide on (advanced Users guide) Adding offset conditions, but still struggling to try and achieve what I would like to do, maybe its all in there and I have just miss read or understood something.
Basically I have several toggle switches and they are wired to a game controller, its actually a desktop aviator card with 36 connections. when I flip a toggle switch one way, the response is computer picks up is a 1/2sec button press so in other words a momentary push switch. (yes the toggle switch is a momentary push switch
So following the guides and advanced users guide
I've come up with the following three lines of script.
[Buttons.pmdg737]
1=P0,11,C1005,3842 -joy 0 button 11, toggle flag, 256 * joystick 15 + button 2
2=CP(F+15,2)0,11,69633,0 - condition ( joystick 15,2)physical control, pmdg offset 69633, set 0
3=CP(F-15,2)0,11,69633,1 - condition ( joystick 15,2)physical control, pmdg offset 69633, set 1
Issues i have is : flipping switch one way turn switch from off to on. But subiquent flipping of switch will have pmdg cycle the respective element off then back to on.
what i really need is an if statement or case select to test position? If such a thing exists.
maybe someone solved this problem 10 years ago and I just haven't come across it yet.
Many thanks for reading.
Norm
0
Quote