
Paul Henty
Members-
Posts
1,723 -
Joined
-
Days Won
76
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by Paul Henty
-
MSFS 2024 with FSUIPCWebSocketServer (1.1.2)
Paul Henty replied to Robs113's topic in FSUIPC Client DLL for .NET
Okay - What about using the socket server with MSFS - does that still work or is that broken as well? Paul -
MSFS 2024 with FSUIPCWebSocketServer (1.1.2)
Paul Henty replied to Robs113's topic in FSUIPC Client DLL for .NET
Could be related to this: Could you please download the FSUIPC WASM Module 1.0.6 + WAPI 1.0.4 package from fsuipc.com. Inside is a WASMClient test program. Can you see if that will list the LVars? (File -> Start, then Control -> List LVars). If it does then this problem is with my code and I'll look into it some more. If that test client will not list LVars then it's a problem with the WASM modules and you'll need to ask John about that. Paul -
MSFS 2024 with FSUIPCWebSocketServer (1.1.2)
Paul Henty replied to Robs113's topic in FSUIPC Client DLL for .NET
I missed a couple of places where the sim is checked. Could you try this one? Thanks, Paul FSUIPCWebSocketServer_V1.1.3.zip -
MSFS 2024 with FSUIPCWebSocketServer (1.1.2)
Paul Henty replied to Robs113's topic in FSUIPC Client DLL for .NET
Hi Rob, I've attached the new version. I can't test it here as I don't have MSFS2024 but I'm pretty sure it'll work. No other changes - just the Variable Services should recognise and connect to 2024 now like it does for 2020. Could you let me know if it works and I'll release it on the website. Thanks, Paul -
MSFS 2024 with FSUIPCWebSocketServer (1.1.2)
Paul Henty replied to Robs113's topic in FSUIPC Client DLL for .NET
Hi Rob, Looks like I need to update it to recognise MSFS2024. I'll get a new version out tomorrow. Paul -
There's an example project that explains how to use it. It also explains where to get a required file called FSUIPC_WAPID.dll that you need, and how to include it in your project. http://fsuipc.paulhenty.com/#downloads The example project is a few years old now. If it includes a FSUIPC_WAPID.dll file it could be too old to work so you should get the latest. On the MSFS side you need to install the WASM module which is installed by the FSUIPC installer. So make sure you're also up-to-date with the latest FSUIPC7. MSFSVariableServices is a completely separate system from the normal connection used for offsets. It's the preferred way to work with LVars (and HVars) in MSFS as it's hundreds of times faster than FSUIPCConnection.ReadLVar(). Paul
-
If you're using FSUIPC7 (MSFS) and the new MSFSVariableServices class then yes, you can: MSFSVariableServices.CreateLVar("L:NewLVar", 0); // (Name, Initial Value) If you're using FSUIPC6 (i.e. the legacy FSUIPCConnection.ReadLVar() method) it's possible (FSUIPC6 supports creates) but I haven't included it in the DLL. Let me know and I can a add it. For FSUIPC5 and earlier versions it's not possible to create LVars. Paul
-
Hi. Sorry for the delay in replying, I've only seen it today. The newer versions of the DLL only work with .NET Framework 4.6.2 or later. As the error message shows, your project is currently using Framework 4.5 which is not compatible. You need to upgrade the framework used by your project: Go to your project in the solutions explorer and double-click on the 'My Project' node. In the "Application" tab, find the dropdown called "Target framework" and change it to 4.6.2 or later. You may need to install if if it's not in the list. Reload the project and then add the Nuget Package again. Paul
-
New Fuel System - How To Read Tanks
Paul Henty replied to CougarFool's topic in FSUIPC Client DLL for .NET
Hi Nigel, I don't know anything about the new fuel system. I assume that you can't get the info via the normal Payload Services class? Maybe @John Dowson knows something about this. There may be some new offsets, or LVars you can use. Paul -
FSUIPC6 start some exe but not kill them
Paul Henty replied to sisoffi's topic in FSUIPC Client DLL for .NET
Please repost your question in the main FSUIPC forum here: https://forum.simflight.com/forum/30-fsuipc-support-pete-dowson-modules/ This sub-forum is about .NET programming. Your post may not be seen by someone who can help you here. Paul -
Hi Lolo, After you make changes to Payload Stations and Fuel Tanks you need to call WriteChanges() to send the changes to the Sim. I think in WinDev it will be something like: FSUIPCConnection.PayloadServices:WriteChanges() If you need to change many Fuel Tanks you just call this once at the end: oFuelTanks :get_Item(FSFuelTanks ::Centre_Main) :set_LevelPercentage(30) oFuelTanks :get_Item(FSFuelTanks ::Centre_Left) :set_LevelPercentage(50) oFuelTanks :get_Item(FSFuelTanks ::Centre_Right) :set_LevelPercentage(50) FSUIPCConnection.PayloadServices:WriteChanges() Paul
-
C# app integration for hardware and WASM module
Paul Henty replied to brandonharwood14's topic in FSUIPC Client DLL for .NET
Hi Brandon, I can't see anything wrong with the code you've pasted, but it doesn't show where you are calling Process(). The built-in ValueChanged flag only tells you if the change happed on the last Process(), so if you're checking values on a different timer or thread than the Process() calls you could miss the change. (Two process calls go by between your checks for ValueChanged). Could that be what's happening? If so I could make it so that ValueChanged is preserved until you actually test for the change. The ValueChanged feature was added long before multi-threading and async programming was easy in .NET, so it's really designed for a single thread, synchornous application. If that's not the case and your checks are definitely made after every process() on a single thread, please let me know and paste the code where you call Process() and I'll look into it some more. Paul -
The error is correct; you can't create a new instance of it. It's a static class. I don't know wlanguage so I'm not sure how to get a reference to a static class. Maybe this... ps <- FSUIPCConnection.PayloadServices Does that assign a reference of an existing class? Maybe it's not possible and you need to use the full name instead of 'ps': e.g. FSUIPCConnection.PayloadServices:RefreshData() oFuelTanks = FSUIPCConnection.PayloadServices:FuelTanks Try that. Or look at the WLanguage documentation to see how to deal with static classes in .NET. Paul
-
Hi, I don't know WLanguage so I'm going to put the C# and my attempt at WLanguage. You are missing a few steps: First you must get a reference to the PayloadServices: C#: PayloadServices ps = FSUIPCConnection.PayloadServices; Wlanguage? ps is a PayloadServices ps = FSUIPCConnection.PayloadServices; Then you need to call RefreshData to load the current payload information from the Sim: ps:RefreshData() Then you need to get the fuel tanks collection: C#: FsFuelTanksCollection fuelTanks = ps.FuelTanks; WLanguage? oFuelTanks is a FsFuelTanksCollection oFuelTanks = ps:FuelTanks From here the rest of your code should work. Paul
-
HI, I don't have any PMDG aircraft so I can't help much. Check that you've enabled the SDK in the 777's ini file. Have you tried with normal mouse left/right clicks? Maybe you can also just pass the actual baro value you want as the parameter. Some controls work like that. Paul
-
Moving aircraft to gates or runways
Paul Henty replied to Andy B.'s topic in FSUIPC Client DLL for .NET
Hi Andy, When you call MoveAircraftToHere() the DLL moves it to whatever position is set in the StartLocation property of the FsRunway object. That comes from the MakeRunways file called Runways.xml. Within each <Runway> tag is <FSStartLat> and <FSStartLon>. If this file doesn't have the correct location for the start of the runway then there's nothing I can do to fix it. On my system (FS9) this location is correct and so I always get set up on the center line. Make sure your users have run MakeRunways and rebuilt their airports database recently. If it's out-of-date then the data will not line up with any new scenery they've installed. Is it okay on your system? Paul -
Offset.ValueChanged and triggering events
Paul Henty replied to Andy B.'s topic in FSUIPC Client DLL for .NET
You will need need to attach the handlers after the 777 loading process. I'm not clear on the specific sequence of events for your application. There will be a time when you don't want notifications and a later time when you do. When you do, that's when you attach the handlers. It's the handlers that are presumably producing the 'spam' when you don't want them to. If they are no attached yet they won't do anything. Paul -
Offset.ValueChanged and triggering events
Paul Henty replied to Andy B.'s topic in FSUIPC Client DLL for .NET
The best way would be to delay attaching the event handlers until you need them. At the moment you attach them in the constructor. You could take out the call to AttachEventHandlers() and make that method public or internal. Then you can call it when you're application is ready to receive the notifications. You could also have a corresponding DetachEventHandlers() if there will be a time where you want to ignore the notifications. Paul -
Payload data - Empty Weight - issue in Xplane
Paul Henty replied to MF_Vince's topic in FSUIPC Client DLL for .NET
I sounds like XPUIPC doesn't provide payload information. I don't know anything about XPlane unfortunately, so I don't know any ways to make this work. Paul -
Payload data - Empty Weight - issue in Xplane
Paul Henty replied to MF_Vince's topic in FSUIPC Client DLL for .NET
Hi, Is this one of the built-in aircraft for MSFS or a third-party aircraft? If there are no payload stations showing up it looks like the authors didn't add any. Therefore they need to simulate the increase in weight by adding weight to the actual aircraft (empty weight). I would try with another aircraft (one that comes built in to MSFS) to see if that has the same problem. If that aircraft is ok then the problem here is just down to the way this particular aircraft has been programmed. Paul -
>> Offsets work in a simple test app (WPF). Great, thanks for checking that. If you want to PM me the whole project (or a link so I can clone it from github/bitbucket if you're using either) I'll take a look and see if I can see what's going on. Paul
-
What didn't? You mean the PMDG offsets don't work in a simple testing application? Paul
-
The entire application. There is only one connection to FSUIPC and only one pool of offsets. It doesn't matter which class created the offsets; all offsets go into the same application-wide pool. Calling Process() without a group will process every offsets created by your application (by any class) that wasn't assigned to a group. If you want different pools of offsets so you can process them at different times then you need to use the grouping. Note that groups can also be accessed by any class in the application, not just the class that created the group. No, you just open it once. After you call process(). You then check the ValueChanged property or any offsets you want events for. If it has changed you can call an event to notify any other classes that need to know. Looking at your example code: AudioManager.Output(_Offsets.MAIN_TEFlapsNeedle[0].Value.ToString()); FSUIPCConnection.Process(); _Offsets.RefreshData(); You don't need to call Process() here. That's for the offsets that are not in any group. The PMDG offsets are placed in their own group and processed during RefreshData(). You're getting the value of the MAIN_TEFlapsNeedle offset before you've refreshed the data, so you're always going to be getting the value from the previous RefreshData() not the current one. catch (FSUIPCException ex) { } It's not a good idea have exceptions just disappear into the void like this, especially during development. If there's an exception it might give you some much needed information about why your application isn't working. You should at least log them in the console during development, even if your app ignores them. Have you confirmed the PMDG offsets are working by using a simple project with no timers, or connection manager classes etc? Just open the connection, create the PMDG offsets class, refresh the data and then try to read something. I keep suggesting this but you've never told me if you've tried it. Unfortunately it's almost impossible for me to debug your application by looking at single classes. I can't see anything wrong with this class, but I've no idea how it's interacting with everything else in your application. Paul
-
I suggest you make a very plain, simple application so you can test out offsets that don't appear to work. Just a form that opens a connection, processes the offsets and writes them to the form. If they don't work in your simple project then you need to ask John Dowson in the main MSFS (FSUIPC7) support forum. Maybe some of the offsets don't work in FSUIPC7. If they do work in your simple project then it's something to do with the logic in your application. You'll need to use the tools available to find out what the problem is (break points, logging etc.). Paul