Jump to content
The simFlight Network Forums

737 Autopilot Disengage Switch + Autothrottle Disengage Switch - second push


Recommended Posts

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 by AdrianR
Link to comment
Share on other sites

  • AdrianR changed the title to 737 Autopilot Disengage Switch + Autothrottle Disengage Switch - second push
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

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

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 by John Dowson
Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.