Jump to content
The simFlight Network Forums

Convert offset into keystroke


Recommended Posts

Hi,

I've done some searching but can't find an answer so far.

RAAS Pro by FS2Crew allows the RAAS system to be turned on and off using the Water Rudder Toggle control (Ctrl+W by default).

I want to be able to send this keystroke to P3D when my Prosim AC Power gate is active (so that RAAS is active when AC power is on and inactive when AC power is off). Prosim doesn't allow a gate to send keystrokes to P3D directly, but it does allow a gate to send an FSUIPC offset. They've told me I can set a spare FSUIPC offset to be sent when the AC Power gate is active and link this offset in FSUIPC to the Ctrl+W keystroke.

Prosim Options are:

FSUIPC 8 BIT U

FSUIPC 8 BIT S

FSUIPC 16 BIT S

FSUIPC 16 BIT U

FSUIPC 32 BIT S

FSUIPC 32 BIT U

FSUIPC FLOAT 32

FSUIPC FLOAT 64

 

I have worked out how to get a keystroke to send a FSUIPC offset, but I need to know how to do it the other way round..

Thanks in advance for any assistance.

CK

Link to comment
Share on other sites

6 minutes ago, crwk78 said:

I want to be able to send this keystroke to P3D when my Prosim AC Power gate is active (so that RAAS is active when AC power is on and inactive when AC power is off). Prosim doesn't allow a gate to send keystrokes to P3D directly, but it does allow a gate to send an FSUIPC offset. They've told me I can set a spare FSUIPC offset to be sent when the AC Power gate is active and link this offset in FSUIPC to the Ctrl+W keystroke.

If you can make Prosim to send the correct values to offsets 3114 (first) then 3110, both 32 bit U, then you can in this way tell FSUIPC to send the keystroke. That's the easiest, but I don't know if Prosim can be told to send two things for one trigger.

Otherwise you'd need to write a small Lua plug-in to read the "spare" offset and send the same control to 3110/3114. You must use the provided User Offsets to avoid clashes -- any from 66C0 - 66FF, as documented.

Pete

 

Link to comment
Share on other sites

Thanks Pete for quick reply,

Prosim can send two offsets for one trigger but I'm not sure about the order in which it sends them. I can see what 3110 is but what is 3114?

Also, it doesn't allow me to send a value, or do I assign the value to the offset in FSUIPC?

CK

 

 

 

 

Screenshot 2017-08-17 13.09.10.png

Link to comment
Share on other sites

5 hours ago, crwk78 said:

Prosim can send two offsets for one trigger but I'm not sure about the order in which it sends them. I can see what 3110 is but what is 3114?

If you read my first reply you'll see I said 3114 (first). First means write 3114 FIRST!

As described in the Offsets documentation, the PARAMETER goes in 3114, the CONTROL into 3110. Please look again!

5 hours ago, crwk78 said:

Also, it doesn't allow me to send a value

If you can't set a value, what value is it going to send?

Pete

 

Link to comment
Share on other sites

Hi Pete, unfortunately your reply makes me none the wiser!

Quote

If you read my first reply you'll see I said 3114 (first). First means write 3114 FIRST!

I saw what you said and therefore put 3114 first and 3110 second in the Prosim config page. I was trying to point out that just because that's the order I've put them in, I don't know if that's the order Prosim necessarily sends them. 

Quote

As described in the Offsets documentation, the PARAMETER goes in 3114, the CONTROL into 3110. Please look again!

I cannot find the number "3114" in any of the .pdf files you supply with the program. I can see that 3110 is split into two, the control and the parameter, but 3114 is not mentioned. To which documentation do you refer?

Quote

If you can't set a value, what value is it going to send?

At the risk of being completely wrong and berated for it (you've spent years as the expert on this, I have not) does the value go before the x in the Prosim menu? So if the control is 66482 should the second entry above be 66482x3110? And if that is the format, what goes before the x3114 as with a toggle I'd be sending different values each time (on and then off or 1 and then 0 etc)..

Cheers,

CK

Link to comment
Share on other sites

1 hour ago, crwk78 said:

I cannot find the number "3114" in any of the .pdf files you supply with the program. I can see that 3110 is split into two, the control and the parameter, but 3114 is not mentioned. To which documentation do you refer?

Oh dear.

Did you not see that 3110 is 8 bytes, not 4?  ProSim can only write 4 bytes (=32 bits) at a time. 3110 + 4 = 3114. These offset values are NUMBERS, you can use arithmetic! (But take care, they are numbers in Hexadecimal, not Decimal, so counting 0, 1 , ,2, 3 .... 9, A, B, C, D, E, F).

The description of 3110 covers the whole 8 bytes, TWO of your 32-bit U's), 3110 and 3114. With a normal program using these, they would both be written together, as one block of 8 bytes. If you write them separately, as you are forced t, then 3110 must be second because when FSUIPC sees that change it triggers the action with whatever parameter is in 3114 at the time.

2 hours ago, crwk78 said:

At the risk of being completely wrong and berated for it (you've spent years as the expert on this, I have not) does the value go before the x in the Prosim menu? So if the control is 66482 should the second entry above be 66482x3110?

No. The x just means "hexademinal" instead of "decimal", that's all.

The control number must be the parameter sent. I don't know what ProSim is writing to those offsets. If they are only Gates they are probably only open or closed, so I assume it will write 0 or 1. I don't know if there's a solution with ProSim. You'd need Prosim support for that.

I suspect you will need to use a User Offset and use it for an event in a Lua plug-in to send the control which generates the keystroke.

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.