AdrianR Posted May 4, 2021 Report Share Posted May 4, 2021 (edited) Hi, I use full version of FSUIPC for many many years. I bought Alpha yoke and I would like to configure buttons to behave just like in real 737-800: when you push yoke autopilot disengage switch -> A/P disconnects + warning lights flash + warning tone sounds when you push yoke autopilot disegnage switch SECOND TIME -> warning lights stops flashing + warning tone silences Similar situation is for autothrottle disengage switch. And my question: is it possible to do with FSUIPC? There's TripleUse.lua plugin from Pete but it provides two short presses solution and I'm not sure I can use it here (eg. changing interval time, etc.). Thank you above for your advices. Cheers, Adrian Edited May 4, 2021 by AdrianR Link to comment Share on other sites More sharing options...
John Dowson Posted May 5, 2021 Report Share Posted May 5, 2021 10 hours ago, AdrianR said: I use full version of FSUIPC for many many years. I bought Alpha yoke and I would like to configure buttons to behave just like in real 737-800: when you push yoke autopilot disengage switch -> A/P disconnects + warning lights flash + warning tone sounds when you push yoke autopilot disegnage switch SECOND TIME -> warning lights stops flashing + warning tone silences Similar situation is for autothrottle disengage switch. And my question: is it possible to do with FSUIPC? There's TripleUse.lua plugin from Pete but it provides two short presses solution and I'm not sure I can use it here (eg. changing interval time, etc.). Thank you above for your advices. Yes, you can do this using lua. However, don't use the Tripleyse.lua, as that is to distinguish between short, long and double presses based upon the timings of the press events received. What you want is to use a lua that uses event.button, but maintain a global variable so that you know if this is the first press or the second press, and then perform the required actions accordingly. Link to comment Share on other sites More sharing options...
AdrianR Posted May 5, 2021 Author Report Share Posted May 5, 2021 I'm not familiar with LUA and tried to make simple script to test basic functionality but it doesn't work: joy = 0 btn = 13 function buttonpress(j, b, du) ipc.control(69737) end event.button(joy, btn, 1, "buttonpress") I put this TEST.lua file to FSUIPC folder, start P3D with NGXu but when I press yoke button (FSUIPC defines it as joy 0 and button 13) nothing happens. 69737 is NGXu offset for attend call button (taken from NGXu SDK). Cheers. Link to comment Share on other sites More sharing options...
Pete Dowson Posted May 6, 2021 Report Share Posted May 6, 2021 (edited) 11 hours ago, AdrianR said: I put this TEST.lua file to FSUIPC folder, start P3D with NGXu but when I press yoke button (FSUIPC defines it as joy 0 and button 13) nothing happens. 69737 is NGXu offset for attend call button (taken from NGXu SDK). Not an "offset" (offsets are places in memory where data is kept for reading or sometimes writing), but a "custom control". And it may need a non-zero parameter which you've omitted. The parameters are mostly mouse codes which are also listed in the SDK. How are you starting the Lua plug-in? It doesn't load and run itself. You either need to assign it to a button or keypress to load it, or, more usually, load it via an entry in an [Auto] section in the INI file -- presumably on for the Profile you are using for the NGXu, e.g [Auto.NGXu] 1=Lua TEST Try testing the control actually does what you want first by assigning to the button directly in FSUIPC assignments and maybe having a parameter. Pete Edited May 6, 2021 by John Dowson Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now