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 post
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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • 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.