Jump to content
The simFlight Network Forums

FSUIPC and EPIC : how to write negative value.


Recommended Posts

Hi Peter.

I use PM, FSUIPC and EPIC system in my flightdeck.

How can I sent a negative value to offset 04E6 ?

EPIC can't handle it with nqw. To sent +2000 fts/min, no pb, but to sent -2000fts/min, it is impossible. But, when using pigeon holes for this 04E6 offset, I can get the sign of the value with the mask 0X8000. But it is from a code I get on the internet, so I don't understand it.

By the way, this offset is told to be read only, but I can write it and it works.

So Can you tell me the format of the value in this offset, by exemple, for a VS of -2000 or -700. Something in hex format ? I will figure how to make it and sent if via my EPIC code.

RE

http://remont.free.Fr/cockpit

Link to comment
Share on other sites

I use PM, FSUIPC and EPIC system in my flightdeck.

How can I sent a negative value to offset 04E6 ?

Whether a value is positive or negative is all in the interpretation, not the value. In 16-bits, for example, a value 65535 looks identical to a value of -1, depending whether you treat it as signed or unsigned. In hexadecimal they both look like FFFF.

EPIC can't handle it with nqw. To sent +2000 fts/min, no pb, but to sent -2000fts/min, it is impossible.

If this is in a 16-bit (2-byte) word, then send 63536. It is the same. Calculate it as 65536 + (the negative value). In EPIC you would need to do

65535 - (your positive value, eg 2000)

then add 1. The 1 difference is needed because 65536 cannot be accommodated in 16 bits.

Regards

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.