Andy B. Posted October 22, 2022 Report Posted October 22, 2022 Is it possible to have the PMDG 737 offsets for msfs and p3d/fsx combined in the same class? The new class would determine what version of FSUIPC is loaded, then make public the appropriate offset? Example: If we are running FSUIPC 7, give us the offsets for msfs. Otherwise, give us the offsets for p3d/fsx. It would make our project more streamlined and prevent us from having to maintain duplicate projects for a single line of code.
Paul Henty Posted October 22, 2022 Report Posted October 22, 2022 Yes, that's a great idea. I've had a look and it's possible to do a combined class. I didn't realise the offsets names were almost identical. The new MSFS class will be scrapped and I'll extend the old NGX class to include any new MSFS offsets. When you instantiate the class it will look at the flight sim you are connected to and create the offsets with the correct addresses. I'll have a new beta out later today. Paul
Andy B. Posted October 22, 2022 Report Posted October 22, 2022 Thanks for doing this... You are a life saver!
Paul Henty Posted October 22, 2022 Report Posted October 22, 2022 Hi Everyone, Version 3.2.24-beta is now on Nuget. This has a single, combined PMDG_737_NGX_Offsets class which automatically maps the offsets to the correct address depending on the simulator being used. Thanks to Andy B. for the idea. In theory you should be able to use existing PMDG code with no changes and have it work with any simulator. Except: In order to determine the simulator being used, the class now needs an open connection when it's created. If you are currently calling "new PMDG_737_NGX_Offsets()" before your connection is open, you need to delay it until after the connection is open. The PMDG_737_MSFS_Offsets class has been deleted. There are a couple of offsets that have had their type corrected (e.g. vertical speed is now signed instead of unsigned). Also if anyone is using specific WideClient class instances, you now pass the class instance to the constructor and not to RefreshData(). Paul 1
Jason Fayre Posted October 22, 2022 Report Posted October 22, 2022 Hi Paul, As always, you are amazing! Andy and I are the developers of Talking Flight Monitor. We use literally almost all of the pmdg offsets, so this is incredibly helpful! I dropped the new library into our project and it appears to be working perfectly so far. Thanks! 1
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