
Paul Henty
Members-
Posts
1,729 -
Joined
-
Days Won
78
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by Paul Henty
-
This control needs two parameters: the index of the source bus and the index of the circuit you want to connect to. (The 2 and 1 in the example code you posted). I don't think it's possible with FSUIPC to send two parameters to an event. Historically they've only allowed one. There are two alternative options I know of: 1. Use the MSFSVariableServices class to execute the calculator code directly: MSFSVariableServices.ExecuteCalculatorCode("2 1 (>K:2:ELECTRICAL_BUS_TO_CIRCUIT_CONNECTION_TOGGLE)"); There is an example project for getting started with MSFSVariableServices on the website: http://fsuipc.paulhenty.com/#downloads 2. Use the 'presets' feature to execute the calculator code stored in the myevents.txt file. See the "FSUIPC7 for advanced users" pdf and offset 0x7C50. Paul
-
Thanks for checking. I'll upload this version to the website this evening. Paul
-
I have attached a beta version of the WebSocketServer below. This should have full support for MSFS2024. I haven't released it properly yet because I've not found anyone that can confirm if it works or not. (I don't have MSFS2024). Boebus can you please try the attached version and let me know if it works or not? Thanks, Paul FSUIPCWebSocketServer_V1.1.3-Beta.zip
-
I think this is a question for @John Dowson. My DLL just writes the hours to offset 0x023B and minutes to 0x023C regardless of what sim you're connected to. Paul
-
MSFS 2024 with FSUIPCWebSocketServer (1.1.2)
Paul Henty replied to Robs113's topic in FSUIPC Client DLL for .NET
Hi Rob, I've messaged John about this - he says there is an issue where the WASM module sometimes crashes. There is a FAQ about it here: It might be worth trying with a stock aircraft in MSFS2024 or going through the fix suggested in the above post. Paul -
MSFS 2024 with FSUIPCWebSocketServer (1.1.2)
Paul Henty replied to Robs113's topic in FSUIPC Client DLL for .NET
Thanks for all the info. Leave it with me, I'll see if I can sort it out. Paul -
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