Jump to content
The simFlight Network Forums

Assign two function for one button


Recommended Posts

Dear Pete,

i need to assign on a specific button 4,21(battery switch) one macro as well assigned and the toggle master battery 66241 (but inverted: when macro is on 66241 must off and viceversa) in the same button. This is for the attitude gauges that is extra Maddog panel. Is possible? i try to modify direct ini in this manner, and work but the toggle 66241 must be inversed...

......

......

121=P4,21,CM1:1,0

122=U4,21,CM1:2,0

.....

.....

241=P4,21,C66241,0

242=U4,21,C66241,0

or

121=P4,21,CM1:1,C66241,0

122=U4,21,CM1:2,C66241,0

thanks,

Simone

Link to comment
Share on other sites

i need to assign on a specific button 4,21(battery switch) one macro as well assigned and the toggle master battery 66241 (but inverted: when macro is on 66241 must off and viceversa) in the same button.

Double assignments need more than one line. One button can do lots of things, but you either have to have one assignment to a macro, then do all the things in a macro, or have multiple assignments in the INI file. Which you choose is up to you, it does not matter.

i try to modify direct ini in this manner, and work but the toggle 66241 must be inversed...

......

......

121=P4,21,CM1:1,0

122=U4,21,CM1:2,0

.....

.....

241=P4,21,C66241,0

242=U4,21,C66241,0

That will execute lines 121 and 241 when the button is pressed, and 122 and 242 when released.

What do you mean by "the toggle 66241 must be inversed..."? Toggle controls toggle -- i.e. invert the current condition. You can't invert an inversion -- or rather, you can by doing nothing. Just delete the second assignment to the control. Then it won't do anything.

If you want more specific control over the Battery switch you need to access the FSUIPC battery switch offset instead. Assign to the "Offset Byte Set" control with offset x3102 and parameter 1 to turn it on, 0 to turn it off.

Regards

Pete

Link to comment
Share on other sites

If you want more specific control over the Battery switch you need to access the FSUIPC battery switch offset instead. Assign to the "Offset Byte Set" control with offset x3102 and parameter 1 to turn it on, 0 to turn it off.

howo to modify the "offset byte set" i cannot find any function in fsuipc module. it need directly to ini file?

Link to comment
Share on other sites

howo to modify the "offset byte set" i cannot find any function in fsuipc module. it need directly to ini file?

The format is actually described in the Advanced User's Guide, at the end of the list of all the added FSUIPC controls, but it would be much easier for you to assign in the way I described, using the FSUIPC options dialogue -- maybe to another button, then just change the button number in the INI.

Regards

Pete

Link to comment
Share on other sites

The format is actually described in the Advanced User's Guide, at the end of the list of all the added FSUIPC controls, but it would be much easier for you to assign in the way I described, using the FSUIPC options dialogue -- maybe to another button, then just change the button number in the INI.

Regards

Pete

ok pete, i resolve!

Another question:

One button ATTENDANT CALL have two macro assignement on the mouse: LEFT click is to sound "din don" and RIGHT click is to open a small window and choose if start boarding, prepare takeoff announcement for attendants. In you opinion is possible to command this button with fast click (corresponding at MACRO "din "don" and long click correspond to MACRO "open window for attedants menu") or there is another easy way?

thanks,

Simone

Link to comment
Share on other sites

How are you assigning mouse buttons? It isn't a facility offered by FSUIPC.

Regards

Pete

Dear Pete, happy new year!

I assign when click the function "ATTENDANT CALL" macro and when release the function "OPEN MENU ATTENDANT CALL" macro. But there is a solution for my problem.

I need this:

if i click with a fast time press i have one assignement.

if i click with long time press i have the other assignement. is possible?

have you another solution if not?

thanks,

Simone

Link to comment
Share on other sites

I need this:

if i click with a fast time press i have one assignement.

if i click with long time press i have the other assignement. is possible?

have you another solution if not?

This is precisely what the example Lua provided with FSUIPC does -- check TripleUse.lua in the Lua plugin examples in your FSUIPC Documents folder. This uses one short click, a double click, and a longer press, for three different things.

Regards

Pete

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.