Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello guys,

I'm using FSIPC SDK in Java and the offset 0366 worked fine on FS2004, but on FSX-SE (FSUIPC v4.974) return these values on ground or airborne:

253952001
254017537
254083073
254214145
254279681

Each of these values have been obtained with a one second gap.

I obtain the offset value with this code:

    public static void Estado() {
        fsuipc_wrapper.Open(fsuipc_wrapper.SIM_ANY);
        FSUIPC fsuipc = new FSUIPC();
        Estado = fsuipc.getInt(0x0366);
        fsuipc_wrapper.Close();
        System.out.println(Estado);
    }

Please, any idea.

Thank you very much.

Posted
38 minutes ago, Molaguita said:

I'm using FSIPC SDK in Java and the offset 0366 worked fine on FS2004, but on FSX-SE (FSUIPC v4.974) return these values on ground or airborne:

Offset 0366, as clearly documented, is a 2-byte value (a short in C), which can range from 0 to 65535 (or -32768 to +32767 is treated as signed), so it cannot possibly have those values!

It looks like you are reading it as an "int" which is normally a 4-byte or 32-bit value. You are reading the value at 0368 too, as the "high" 16-bits. That probably wasn't used in FS2004, or if it was was normally zero.

Pete

 

 

Posted

Sorry, I'm a without experience programmer and I didn't know short type, but using the next code, solved problem.

Estado = fsuipc.getShort(0x0366);

Thank you Pete and congratulations for your great job.

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.