Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello Pete

I would like to open the proatcx inflight menu with a button via a free offset. have defined the same keypress as in proatcx option 
with controls in fsuipc. However, after saving I can't open the proatcx window using the key combination. 
How can I change this? need that for use with scpascal7 programming. 

Thank you very much for your reply.

kind regards Ramon

 

Posted
2 hours ago, Metall4You said:

I would like to open the proatcx inflight menu with a button via a free offset. have defined the same keypress as in proatcx option with controls in fsuipc. However, after saving I can't open the proatcx window using the key combination. How can I change this? need that for use with scpascal7 programming.

Why via a "free offset"? How does the offset relate to a keypress? Why not assign the keypress to the button directly?

And what key compbination have you programmed ProATC/X to respond to? 

Pete

 

Posted

Hello Pete

Thank you for your Answer. I use a SimioBoard USB Main Card with Inputs, but i can't assign a keypress to a Button. When i press a Button, fsuipc don't

see the input, this card has no joystick option. I use the scpascal7 programing with following lines and works with SIMCONNECT_MENU_0 to SIMCONNECT_MENU_9:

scpascal7

Debug('KeyPressed 0'); 
                
WriteFSUIPC($3114,4,value);               
WriteFSUIPC($3110,4,67145);

fsuipc.ini

12=N48,8,67145,1,67145,0     -{0: Press=SIMCONNECT_MENU_0, Release=SIMCONNECT_MENU_0 }-

----------------------------------------------------------------------------------------------------------------------------------------------------------------

i would like to use the same for the 'ProATCX Inflight-Menu' to open with keypress 'CTRL 9'... but witch Number is this like 67145?

Many thanks and kind regards

Ramon

 

 

Posted
2 hours ago, Metall4You said:

Thank you for your Answer. I use a SimioBoard USB Main Card with Inputs, but i can't assign a keypress to a Button. When i press a Button, fsuipc don't see the input, this card has no joystick option.

A way around that is to use it to toggle one of the "virtual buttons". FSUIPC has 288 of them, every bit of offsets 3340-3363. You can either toggle them directly, or perhaps easier use the 4 byte offset 29F0 to specify which button, and whether to press, release or toggle.

Then you have assignable buttons!

2 hours ago, Metall4You said:

I use the scpascal7 programing with following lines and works with SIMCONNECT_MENU_0 to SIMCONNECT_MENU_9:

scpascal7

Debug('KeyPressed 0'); 
                
WriteFSUIPC($3114,4,value);               
WriteFSUIPC($3110,4,67145);

3110 and 3114 are not "free offsets" as you stated, but assigned and documented FSUIPC functions, as you are indeed using.

2 hours ago, Metall4You said:

i would like to use the same for the 'ProATCX Inflight-Menu' to open with keypress 'CTRL 9'... but witch Number is this like 67145?

67145 is an FS Control. There's no FS control for a keypress, except for the "SELECT 1' to 'SELECT 4' controls as used to select Engines or actions for several other controls.

There is an FSUIPC added control to send keypresses. Look up numbers 1070-1072 in the list in the FSUIPC Advanced User's manual, about half way through, in a section called Additional “FS” Controls added by FSUIPC5  and certainly listed in the Contents at the front.

Pete

 

Posted

Hello Pete

I would like to use the following:

1070 Key Press and Release (param is Keycode + 256*Shift code, or JsBk)

now i use 'shift + k' to open the ProATCx 'inFlight-Menu'

75 + (256 x 1) = 75 + 256 = 331 is this correct?

What now i have to do with this Number?

WriteFSUIPC($3114,8,331);               
WriteFSUIPC($3110,8,1070);

i tryed with this Entry's, but the Window not show... What make i wrong?

Many thanks

Ramon

 

 

 

Posted
2 minutes ago, Metall4You said:

i tryed with this Entry's, but the Window not show... What make i wrong?

When you used offset 3110 and 3114 before you correctly set the number of bytes to 4. Now you suddenly use 8. So when you write 8 bytes to 3110 you set 3114 to zero (3110 + 8 = 3118)., so overwriting your keystroke encoding!

Otherwise it looks okay. You just need to be a little more careful.

Pete

 

Posted

Hello Pete

Now it works with this Lines but i need 2 times to press the button to show the Window... What i need to doe for only one press?

WriteFSUIPC($3110,4,1070);               
WriteFSUIPC($3114,4,331);

My other Question, i have the the LUA File 'AllTexts.lua' loaded on my ClientPC with WideClient. How can i hide the 'ProATCX - Inflight-Menu' on the 

Main Screen?

Many thanks for your Answer, you make my Day.

Ramon

Posted
2 hours ago, Metall4You said:

Now it works with this Lines but i need 2 times to press the button to show the Window... What i need to doe for only one press?

Sorry, I don't know why the program needs it pressed twice on your PC. Maybe it is related to the keystroke combination you have chosen?

2 hours ago, Metall4You said:

My other Question, i have the the LUA File 'AllTexts.lua' loaded on my ClientPC with WideClient. How can i hide the 'ProATCX - Inflight-Menu' on the Main Screen?

As the documentation says, L-M have provided no way to remove the Menus.

If you are using WideFS why not use the ButtonScreen facility top operate your Memus etc. That's what I do. The ButtoScreen facility makes use of the Virtual Button facility, which was one of the first solutions I suggested to you in this thread, and that works well, with ProATC/X, yes, as I used to use, but also GSX.

I am using Pilot2ATC for my ATC now.

Pete

 

Posted

I try to use a Virtaul Button with my SimioBoard-USB-Main Card, the Input has the Number 16.

Here my Code:

Var
   // initialize static integer array via array literal
   Numbers : array [4] of Integer = [16, 64, 1, 0];  

 InitOffsetFSUIPC($29F0,4);           
                      
 WriteFSUIPC($29F0,4,Numbers); 

Is now this Button visible in Fsuipc? Need to define any Entry in the [Buttons] Section?

Kind Regards

Ramon

Posted
6 hours ago, Metall4You said:

I try to use a Virtaul Button with my SimioBoard-USB-Main Card, the Input has the Number 16.

The input "number" is not relalted to the button number you choose. Why choose 16, Why not 0 or 1, etc?

6 hours ago, Metall4You said:

// initialize static integer array via array literal
   Numbers : array [4] of Integer = [16, 64, 1, 0];

What language are you using? Is an "integer" defined as a byte (i.e 8 bits)? You need bytes if sent as an array, though it would be much easier to write it as one 32-bit value, as suggested in the documentation. For example, your values would be:

$00014010

6 hours ago, Metall4You said:

 WriteFSUIPC($29F0,4,Numbers); 

I don't know how the language or library you are using works on this. If you are using .NET and Paul Henty's DLL, then I think you should get his advice on your style.

6 hours ago, Metall4You said:

Is now this Button visible in Fsuipc? 

Virtual buttons act like real buttons. J64, B16 will show in Button assignments as joystick 64, button 16. That's the point! You then use it as you wish!

Don't forget, you are setting the bit (pressing the button). If you want it to be seen again you'd need to clear it (release it) some time. The alternative, if it isn't supposed to be a latching switch, is to toggle.

Pete

 

Posted
4 hours ago, Metall4You said:

I use SCPascal for programing... 8 Bytes use Double, is that correct?

A 64-bit double float is 8 bytes long (8x 8 = 64), but an 8-byte offset is not always a double. you have to read and understand the context. They may be characters (bytes), 4 x 16bit "words", or 2 x 32 bit integers. Flight Sim does sometime uses 64-bit integers, not always floating point.

The 4-byte offset you are using to trigger a virtual button indication is made of 4 x 1 byte values, as documented. Not the 8 you were writing. And the bytes must be in the correct order. So see my suggested value.

Pete

 

Posted

// initialize static integer array via array literal
   Numbers : array [3] of byte= [16, 64, 1, 0];

it would be much easier to write it as one 32-bit value, as suggested in the documentation. For example, your values would be:

$00014010

pete, how can calculate them or where i can found the documentation?

 

Posted

pete, found it 

So, for example, you can send 0x00014016 to offset 29F0 to "press" button 22 (hex 16) on joy 64 (hex 40)

with Decimal to Hexadecimal Converter

kind regards Ramon

Posted

Hi Pete

It works with this Lines of Code in SCPascal7:

WriteFSUIPC($3340,4,$0001400); if Value =1 of the Button Press-Function in SCPascal7

WriteFSUIPC($3340,4,$0002400); if Value =0

The i can assigne the KeyPress for the ProATCx Window and this goes open, but when i use the Offset 29F0 with the same, nothing happens. The Button is not show in FSUIPC.

What is the differens between this?

 

kind regards Ramon

  • 2 weeks later...
Posted
On 10/9/2018 at 7:31 AM, Metall4You said:

WriteFSUIPC($3340,4,$0001400); if Value =1 of the Button Press-Function in SCPascal7

WriteFSUIPC($3340,4,$0002400); if Value =0

The i can assigne the KeyPress for the ProATCx Window and this goes open

Writing 0x00001400 to offset 3340 sets virtual buttons 64,18 AND 64,19 as "pressed". Why are you pressing two buttons? Not only that, you are "releasing" buttons 64,0-17 and 64,20-31. 

Writing 0x00002400 is similar but presses 64,18 and 64,20, and releases all the rest on virtual joystick number 64.

Writing 0x00001400 to offset 29F0 says toggle button 0 on virtual joystick 20 (0x14), which doesn't exist --- as it says, virtual joysticks are from 64 to 72. Similarly writing 0x00002400 there toggles button 0 on vurtual joystick 36 (0x24), which of course also doesn't exist.

Please do refer to the descriptions of these facilities.

Pete

 

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.