Jump to content
The simFlight Network Forums

Basic help for a Newbie


Recommended Posts

Let me preface my question by saying I have read every word in the FSUIPC advance user doc and the PM offset doc.

I still don't understand how to transalate the offset in to an entry in FSUIPC.ini.

Here is my question. I need to program a button on my GoFlight RP48 to set the Altimeter to STD. I am using the Project Magenta MCP.

According to the PM Offset doc for this command is 5414 the size is 4. The commmand is actually listed as (ASTO Bit19 (AB STD/QNH pull -> STD BARO 29.92 in))???

Ok now I understand that the FSUIPC follows the following format for a control: = ,,C,.

Ok that is as far as I get. How do I get that PM offset command into that format. Assume the Joystick number is 124 and the Button # 3.

If I can get this one I think I can do the rest myself.

Thanks.

Link to comment
Share on other sites

Here is my question. I need to program a button on my GoFlight RP48 to set the Altimeter to STD. I am using the Project Magenta MCP.

The MCP you are using is not relevant -- PM uses FS's barometer setting. The way to set "STD" is simply to program a button for "Kohlsman Set" as described in the FSUIPC User guide -- it is one of the examples, thus:

You can have a single button send a control with a fixed parameter—you specify this in the parameter field. A good example is a button to set the “standard barometer” setting (1013.2 hPa or 29.92"), for flying Flight Levels. For this, select:

Kohlsman Set as the control, and

16211 for the parameter (1013.2 mb x 16 = 16211)

Anyway, following through with your actual question simply as an example:

According to the PM Offset doc for this command is 5414 the size is 4. The commmand is actually listed as (ASTO Bit19 (AB STD/QNH pull -> STD BARO 29.92 in))???

Is it? "ASTO"? Not sure what that means. Is that an Airbus term?

Ok now I understand that the FSUIPC follows the following format for a control: = ,,C,.

Ok that is as far as I get. How do I get that PM offset command into that format. Assume the Joystick number is 124 and the Button # 3.

Stop right there. First, please explain why you are delving into the Advanced users guide and trying to do all this manually by editing FSUIPC.INI? Why not use the facilities provided to make this a lot easier?

Please, please, check the simple FSUIPC User Guide first. It tells you about a page in FSUIPC's options, selected by one of the Tabs in the on-line options, called "Buttons".

Just load up FS, go to the FSUIPC options, select the Buttons tab, press your button, select Controls, drop down the list of controls and find the "Offset Dword Togglebits" control.

Why this? Well, you refer to PM's offset 5414 as 4 bytes in length. One byte = 8 bits. 1 word = 2 bytes = 16 bits, and 1 double word or DWORD is 4 bytes = 32 bits.

"Toggle" rather than Set or Clear because, if you check PM's offset 5414 again you will see it says to toggle the bit. Near the end, Right?

So, select that control, and put "x5414" as the offset (in the space marked "offset"). The "x" is there for "heXadecimal, otherwise numbers look like decimals.

Now the only thing left is the parameter. That's more tricky. "Bit 19" needs to be set, the others zero. To take the simplest approach, this means 19 zero bits (we count from zero in this world) then one 1 bit, from the bottom (least significant) part of the number. i.e:

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

Now, notice I've split these into groups of 4. This is not just to make them easier to count but also because it makes it easier to convert to hexadecimal. Hexadecimal is base 16 -- 16 is 2 x 2 x 2 x 2, and numbers from 0 to 15 occupy 4 bits in binary.

Reading the above "reversed binary" number forward instead we get:

1000 0000 0000 0000 0000

converting this to Hexadecimal we get:

1000 = 8 (1 x 2 x 2 x 2, + 0 for the other three bits)

0000 = 0 (easy?)

0000 = 0

0000 = 0

0000 = 0

so, the parameter needed, in hex, is x80000.

That's it.

Please, next time you have a question on PM (which this really is, as it is PMs offset documentation which needs the explanation), please post it to the PM newsgroup/website. I'll help there as well, but there is a wealth of PM expertise in all these things there and you'll be better off.

Regards,

Pete

Link to comment
Share on other sites

Thanks a mil Pete. You just reduced what was for me a hair shedding experience to simpel clicks. I had no idea what the document was talking about!! :?

I think I understand it from here on 2 bytes WORD 4 bytes DWORD, simple enough. This FSUIPC thing is more incredible than I thought.

I should rename my son after you.!

:D

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.