CXA001 Posted October 9, 2021 Report Posted October 9, 2021 I have noticed some strange behavior with offset 0X3124 to detect a flight simulator platform both with FSUIPC6 & FSUIPC7 (latest versions). Usually, when I load a flight whether FS20 or P3Dv5.2, offset 0X3124 will return the following values: 52 for P3Dv5.2 110 for FS20 However sometimes when I load a flight, it will return a weird value of 820. 803, 806, etc. I have also noticed that this happens mid-flight on flights over 3 hours which plays havoc with my applications. I do not have this issue with offset 0X3308, but unfortunately it does not provide the detailed flight simulator platforms that I am looking for. Any ideas? I have attached a couple of raw data screenshots of the raw data. Regards, Marc
Paul Henty Posted October 9, 2021 Report Posted October 9, 2021 Offset 3124 is described being 1 byte in the documentation, so it would be impossible to get a value over 255. What's likely happening is that you've declared the offset as being larger (e.g. short or int) and you're getting data from subsequent offsets like the fuel pumps (3125) and view direction (3126) mixed in with the version value. Declare the offset as 'byte' and you should be fine. Paul
CXA001 Posted October 11, 2021 Author Report Posted October 11, 2021 Hi Paul, You are correct, I had declared the offset as a short instead of a byte. 😞 Reading your explanation, this makes perfect sense. I have changed the offset from a short to a byte in my code and as expected, I am now getting the correct values on a consistent basis. Not sure how I missed that, but thanks for pointing out my error. Regards, Marc
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