Molaguita Posted March 19, 2018 Report Share Posted March 19, 2018 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. Link to comment Share on other sites More sharing options...
Pete Dowson Posted March 19, 2018 Report Share Posted March 19, 2018 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 Link to comment Share on other sites More sharing options...
Molaguita Posted March 19, 2018 Author Report Share Posted March 19, 2018 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now