Jump to content
The simFlight Network Forums

Ambient Wind Speed Offset


Recommended Posts

private Offset<int> _ambientWindSpeed = new Offset<int>(0x0E90)

Hi Ahmet,

The FSUIPC SDK documentation says that this offset is 2 bytes long. You have declared the offset as an 'int' type, which in C# is a 4-byte integer.

What you are getting is offset 0E90 AND 0E92 together in one value. That's why it's impossibly large.

You need to declare the offset as a 2-Byte integer which in C# is the 'short' type:

private Offset&lt;short&gt; _ambientWindSpeed = new Offset&lt;short&gt;(0x0E90)

Please take some time to review the User Guide that comes with my DLL. It has a section called 'Registering your interest in an Offset' which includes a table showing which .NET types to use for all the different offset lengths and types. It's impossible to get meaningful data from FSUIPC if you don't understand offset lengths and their related data types.

Paul

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.