Jump to content
The simFlight Network Forums

FSUIPC 7.0.5 assign Letters to joy and not numbers


Peter Muransky

Recommended Posts

Dear friends, 

I have one question. I'm using FSUIPC with MSFS and with hidBravoButtons.lua . What I see is, that FSUIPC assign letters A,B,C to joy instead of numbers. So I'm stucked, when I want to use Flags for programming some toggle functions. i.e. with joy C, button 0 it is impossible to use flag 1005 with parameter 256*joy + button.

Could you please help me here?

Thanx

Peter

Link to comment
Share on other sites

Hi John, 

thanks for your prompt answer. This is what I fugured out, so I know that My Joy "C" is Nr. 2. Is it possible to use Joy Nr. instead of Letter? (And FSUIPC will recognise it how it should)

For example: I have joy C (Nr. 2) and want to assign flag to button 0, so I use formula 256*2+0=512 ?

Link to comment
Share on other sites

You can still use the letters and assign to that flag. Did you try?
You can disable joyletters completely but I wouldn't recommend it, especially if you have assignments to those letters.

20 hours ago, Peter Muransky said:

i.e. with joy C, button 0 it is impossible to use flag 1005 with parameter 256*joy + button

Could you maybe explain in a bit more detail what you are trying to achieve, What are you assigning the button to? Or are you doing something in lua?

Link to comment
Share on other sites

Well, I try to programm in ini file assigment that:

1. If I press Button, it will toggle Flag coresponding to the button.

2. When flag is clear, button press set the FS Command, for example switch on hdg

3. When flah is set, button press will set different command, for example switch off hdg

 

I do this: 

35=PC,0,C1005,512     -{: Joy C (2) Button 0}-
36=CP(F-C,0)C,0,66106 
37=CP(F+C,0)C,0,66107 

P.S. to programm lua, well I am now far from it but reading me in. 

And next challenge will be A320neo MCP with SLOT_INDEX variables. 

 

Peter

 

Edited by Peter Muransky
Link to comment
Share on other sites

Ok, but that should work, expect I am wondering why you have this assignment:

     35=PC,0,C1005,512     -{: Joy C (2) Button 0}-

Do you need that? FSUIPC maintains the button flag - from the Advanced User guide:

Quote

For every possible “normal” button (16 joysticks x 32 buttons = 512 buttons) FSUIPC
maintains a “Flag” (F). Each time any button is pressed (goes from off to on) FSUIPC toggles its flag.

So you shouldn't also toggle the same flag as assigned to the button (in your assignment) as that will result in it changing back to the same state (i.e. toggles twice).
 

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.