Jump to content
The simFlight Network Forums

Compound button question


Recommended Posts

Hi,

First of all many thanks to Pete for adding the new bit changing facilities to the new FSUIPC version!

Now - if I may - I have a different question:

What I want to achieve is the a tiny part of the 737 logic regarding the autopilot disconnect button on the yoke.

In the real thing the first press disconnect the autopilot (which I do via the 2040 control PM MCP AP Disc (not 747)), whereas the second press on the same button extinguishes the red A/P disconnected light on the MIP.

I tried achieving this with setting a button-flag and another offset for the second press, but it doesn't work.

Tried this:

1=PA,2,C1005,3842

2=CP(F+A,2)A,2,C2040,0

3=CP(F-A,2)A,2,Cx090056BA,x20

Can you give me any advice how it can be done?

best regards

Potroh

Link to comment
Share on other sites

In the real thing the first press disconnect the autopilot (which I do via the 2040 control PM MCP AP Disc (not 747)), whereas the second press on the same button extinguishes the red A/P disconnected light on the MIP.

I tried achieving this with setting a button-flag and another offset for the second press, but it doesn't work.

Tried this:

1=PA,2,C1005,3842

2=CP(F+A,2)A,2,C2040,0

3=CP(F-A,2)A,2,Cx090056BA,x20

Line 1 toggles button flag 15,2 -- i.e. button 2 on joystick 15. Why are you toggling that when you don't test it anywhere? Or is your joystick A number 15?

In the compound lines you are testing the same button's own flag, A,2. That flag is automaticaly toggled every time you press the button. So if A = 15 you are toggling the flag twice every time it is pressed . The result of that will be that the flag never changes.

The "toggle flag" control (1005) is one of the set of flag manipulating controls intended to allow you to use sets of flags for buttons you don't truly have, out of the 16x32 = 512 possible buttons. But for merely having an alternate action from a button the auto-toggling of real button flags is fine. So, if A=15 remove line 1.

Otherwise, I don't know. You'll need to switch button logging on -- that will tell you what is happening.

Regards

Pete

Link to comment
Share on other sites

Line 1 toggles button flag 15,2 -- i.e. button 2 on joystick 15. Why are you toggling that when you don't test it anywhere? Or is your joystick A number 15?

Hi Pete,

Many thanks again, and my example was wrong indeed, just mixed up the joystick before thinking of the example.

Anyway I found that it is much easier to do in lua, so it works now.

thanks and regards

Potroh

Link to comment
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...
 Share

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