Jump to content
The simFlight Network Forums

FSUIPC: 1 joystick button, 2 control sends.


Recommended Posts

Hi Pete,

Firstly, thank-you for the awesome macro feature - again, you have made life so much easier for many!

I have a question that may well sound silly so apologies in advance.

I am using the Feelthere/Wilco A320 Series 1 and am wondering if it is possible to assign 1 joystick button to do the job of 2 clicks.

In more detail, I am wanting to use one joystick button to activate 1 of the engine master switches. How the Feelthere Airbus works, it requires one 'right click' of the mouse to move the switch to "On" [starts engine] and then one right click of the mouse to move the switch to "Off" to obviously shut down the engine. It should be noted that the mouse click must execute within a different area of where the gauge resides. I.e. right clicking once at the bottom of the gauage will move it to its "off" position and one right click above the gauage will result in it moving to its "on" position.

In all, is there a way. using your fantastic macro feature. that will allow me to assign 2 right clicks (not a double right click) to one joystick button?

Thanks!

Link to comment
Share on other sites

In all, is there a way. using your fantastic macro feature. that will allow me to assign 2 right clicks (not a double right click) to one joystick button?

FSUIPC doesn't perform any clicks at all. The Mouse Macros are NOT emulating a mouse, they are calling code to do what a mouse click would do.

There's a fairly large section about Button programming in the FSUIPC Advanced User's guide. All buttons can have as many actions as you like, defined in the INI file, and these are executed in sequence. So one way of doing your "two clicks" (by which I assume you mean "two operations") is to simply edit the INI file to make that happen.

The other way, specific only to the macro facility, is to have a Macro defined to do what you want. Any macro can have multiple actions defined for it. In fact when you are generating Mouse Macros, if you assign the same action to the same Named macro (i.e. enter the same name twice) both will be recorded for that Macro. But in general, any macro, be it a "mouse" one or simply a mixed list of actions, can be edited to do multiple operations.

Please revieiw the documentation on all this, provided with FSUIPC.

Regards

Pete

Link to comment
Share on other sites

Thanks Pete!

I started having a read of the guide and was fiddling with compounds etc etc but I just don't think I am cut out for you skill hehe.

I'll have a play and see if I can get something to work. Ultimately, it is good to know that it can work.

Thanks!

Link to comment
Share on other sites

I started having a read of the guide and was fiddling with compounds etc etc but I just don't think I am cut out for you skill hehe.

You don't need any conditionals, if that's what you mean. Just two lines for the same button instead of one. When a button is pressed, FSUIPC obeys ALL lines for that button press, in the order of the line numbers (the number before the '=').

The easiest, if you don't understand anything at all, is to assign two buttons, one for each function, in the FSUIPC options, then edit the INI to renumber the 2nd button to be the same as first, so both functions act on that one button. All you need to remember from the Options screen is the Joystick and Button numbers.

Note that once there are multiple assignments to the same button, you can no longer edit it in the FSUIPC Options dialogue. This is why it is now better to make a macro instead, or if you are already using a macro, to simply extend it to operate both functions.

Regards

Pete

Link to comment
Share on other sites

Thanks Pete.

I tried the first option using the INI and assigned the same button twice and while I got a clicking noise in the sim which suggests the starter is moving, I didn't see any physical change which I would if I actually physically click it myself with the mouse.

This is the entry in the INI:

42=P3,11,CM1:3,0

43=P3,11,CM1:4,0

"CM1:3,0" is the recorded macro for the first right click for engine 1 to switch to on. FSUIPC translates this for the INI from the control to send listbox entry as "eng1ON"

"CM1:4,0" is the recorded macro for the first right click for engine 1 to switch to off. FSUIPC translates this for the INI from the control to send listbox entry as "eng1OFF"

For the above items, the macro recorded looks like this:

4=eng1ON=RX5b00*Xa1cc,31

5=eng1OFF=RX5b40*Xa1cc,31

Thanks for all of the help, Pete.

Link to comment
Share on other sites

I tried the first option using the INI and assigned the same button twice and while I got a clicking noise in the sim which suggests the starter is moving, I didn't see any physical change which I would if I actually physically click it myself with the mouse.

It's probably too fast to have any affect on the graphics.

If you want to emulate normal actions, instead of doing this (in fact instead of doing any INI editing at all), all you needed to do was program the first action for the PRESS of the button, and the second action for the RELEASE of the button. You could do both of those in the Options screen.I didn't suggest that before because I assumed you realised you could do that and either didn't feel it was suitable, or you were using a toggle switch not a button.

If you want to edit the button in the Options youd need to delete the second entry you now have for it in the INI.

Just for info, you could make one Macro to do this, instead of actioning two from one button. From this:

4=eng1ON=RX5b00*Xa1cc,31

5=eng1OFF=RX5b40*Xa1cc,31

I can make this new macro, which does both:

6=eng1ON-OFF

6.1=RX5b00*Xa1cc,31

6.2=RX5b40*Xa1cc,31

This facility is described in the Advanced User's guide, in the Macro section, under "multiple actions in one macro control".

Regards

Pete

Link to comment
Share on other sites

Pete,

I really appreciate all of your help with this.

I can make this new macro, which does both:

6=eng1ON-OFF

6.1=RX5b00*Xa1cc,31

6.2=RX5b40*Xa1cc,31

I was reading the guide late last night and came across this. I didn't give it a try as I am unsure as to how the instance works.

From what I understand, if I use the above macro it will perform 2 clicks immediately - upon physically pressing the joystick button. To be a little more clearer on what I am after, I need the first half the macro

6.1=RX5b00*Xa1cc,31
to be performed seperately to the second half
6.2=RX5b40*Xa1cc,31
.

The second half of the macro (

6.2=RX5b40*Xa1cc,31
) would need to be performed by the same joystick button some time after my flight has been completed, hence shutting the engine down.

As one programming to another, i'll try explain it like this.

on joystick3, button12 downpress:

IF RX5b00*Xa1cc,31 = true("on") THEN DO RX5b40*Xa1cc,31 ELSE

RX5b00*Xa1cc,31

The above is simply saying that if the joystick button was previously pressed, it will need to do the second half of the macro when the same button has been pressed again.

I am really sorry for being a pain!

Link to comment
Share on other sites

To be a little more clearer on what I am after, I need the first half the macro

6.1=RX5b00*Xa1cc,31
to be performed seperately to the second half
6.2=RX5b40*Xa1cc,31
.

The second half of the macro (

6.2=RX5b40*Xa1cc,31
) would need to be performed by the same joystick button some time after my flight has been completed, hence shutting the engine down.

You most certainly don't want ANY of these solutions in that case. sorry, I thought you just wanted to return the starter switch to its normal "off" position. On the aircraft I fly the starter actually spring loads back to "off" in any case.

If you want to use the one button to start and aircraft and also, at a time completely unrelated, to shut down, then you need to emulate a toggle switch -- i.e. one which stays in the position you set it until you change it again.

To do that with an ordinary non-latching button you will have to use the Button Flag. Make the "start engine" control conditional on the flag being off, and set the flag at the same time, and make the "shut down" control conditional on the flag being on, and clear the flag at the same time. This effectively turns your button into a latching switch or toggle.

You'll need to read up on the flags and conditionals after all. There are examples.

Regards

Pete

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.