Jump to content
The simFlight Network Forums

Paul Henty

Members
  • Posts

    1,724
  • Joined

  • Days Won

    77

Paul Henty last won the day on February 22

Paul Henty had the most liked content!

About Paul Henty

  • Birthday 01/01/1970

Profile Information

  • Gender
    Male
  • Location
    Gloucestershire, UK

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Paul Henty's Achievements

Proficient

Proficient (10/14)

  • Very Popular Rare
  • Reacting Well Rare
  • Conversation Starter Rare
  • Dedicated Rare
  • Posting Machine Rare

Recent Badges

126

Reputation

  1. Version 3.3.16 of FSUIPCClientDLL is now on NuGet. When using FSUIPC7: Connection will now fail with FSUIPCError.FSUIPC_FS_NOT_READY if the flight sim (MSFS2020 or MSFS2024) is not running or is not ready Version 1.1.4 of the WebSocketServer is now on the website: http://fsuipcwebsockets.paulhenty.com Fixed problem of not detecting the Flight Sim version when using FSUIPC7 and the sim is still starting up. Paul
  2. These problems are causes by a recent change added to FSUIPC7 to support MSFS2024. As John says above the version number is now delayed until FSUIPC7 knows what sim it's connected to. I'm planning to change the DLL so that the connection will fail if there is no FS version. That is, FSUIPC7 is running, but the sim is not loaded/ready. I think that will avoid the problems and keep the behaviour consistent with older FS versions. If the sim isn't loaded and ready then I don't think the connection should succeed. I don't think there is anything useful that can be done with a connection to FSUIPC7 if it doesn't have a connection to the Flight Sim. To John: This change would mean the Socket Server would not need to be delayed. It would just retry until the flight sim version is reported. Paul
  3. You can use the FSUIPC logging to log the controls being sent. You can make sure the numbers are what you expect. Other than that, I can't suggest anything else unfortunately. I don't have any PMDG aircraft. All my DLL does is send the controls and parameter value via FSUIPC. If it's not working you'll need to ask John or PMDG. Paul
  4. Have you tried sending the direct values instead of the mouse click values? Paul
  5. Yes, that's what's happening. The WebSocketServer uses my DLL and that gets the version information when the connection to FSUIPC is opened. Will 0x3308 be 0 before the SimConnection is made? I could check this in the socket server and retry until I get a proper version number. Paul
  6. I don't think so. The LVars come from the loaded aircraft. Paul
  7. 14 is the value for is MSFS2024. I don't think you're using the latest version of the DLL. The puzzling thing is that you say it's working sometimes. Do you mean that you sometimes see "MSFS2024 (VX.X)"? If so are these on the same machine or are these reports from different users? Paul
  8. Which sim are you connected to? If it's MSFS2024 you just need to update to the latest version of the DLL. Paul
  9. Looking at your output, you are getting nothing back from the WASM module at all. When you call Init() the WASM client sends a log message telling you version info and if the WASM SimConnect connection is open or not. You should also expect to see the events OnVariableListChanged and OnValuesChanged being fired, which is also not happening. I suspect it can't find the FSUIPC_WAPID.dll file. Check that this is included in your project and that its property "Copy to output folder" is set to "Copy if newer" or "Copy always". I can't remember if the names come through with the L: on or not. When you're getting variables through you can look at the collection: MSFSVariableServices.LVars.Names to see what LVars it found and their exact names. Paul
  10. I've tried this here using the Key_Press_and_Hold control. It may not do what you're expecting. It doesn't repeat the key until you call the release command. So you don't get the action repeating. You can try it for yourself and see if it does what you're expecting... Just paste this into your code and call. sendKeyHoldToFS - holds the key for the specified HoldTime (in milliseconds) then releases it. sendKeyDownToFS - presses the key down but does not release it. snedKeyUpToFS - releases the key. private void sendKeyHoldToFS(Keys Key, SendModifierKeys Modifiers, int HoldTime) { // First make sure FSX has the focus SendControlToFS(FSUIPCControl.Key_focus_restore, 0); // Wait for focus change Thread.Sleep(150); // Send the key down SendControlToFS(FSUIPCControl.Key_Press_and_Hold, (int)Key + ((int)Modifiers * 256)); // Wait Thread.Sleep(HoldTime); // send the key up SendControlToFS(FSUIPCControl.Key_Release, (int)Key + ((int)Modifiers * 256)); } private void sendKeyDownToFS(Keys Key, SendModifierKeys Modifiers, int HoldTime) { // First make sure FSX has the focus SendControlToFS(FSUIPCControl.Key_focus_restore, 0); // Wait for focus change Thread.Sleep(150); // Send the key down SendControlToFS(FSUIPCControl.Key_Press_and_Hold, (int)Key + ((int)Modifiers * 256)); } private void sendKeyUpToFS(Keys Key, SendModifierKeys Modifiers, int HoldTime) { // First make sure FSX has the focus SendControlToFS(FSUIPCControl.Key_focus_restore, 0); // Wait for focus change Thread.Sleep(150); // Send the key down SendControlToFS(FSUIPCControl.Key_Release, (int)Key + ((int)Modifiers * 256)); } Paul
  11. I'll can a new method for this. Probably SendKeyHoldToFS. You'll be able to specify how long to hold the key for. Would that be suitable or do you need separate key down/up calls and do the timing yourself? Paul
  12. Yes, it's my DLL. To michielsweb: If you're only targeting MSFS2020 or MSFS2024 then you should look at the MSFSVariableServices class. This is way more efficient at dealing with LVARs than the FSUIPC interface. There is a demo project on the website. http://fsuipc.paulhenty.com/#downloads You're exceeding the FSUIPC data limit because you keep declaring a new copy of the offset every time the loop goes round... foreach (string input in simdata_input_pending) { string[] i = input.Split(','); if (i.Length >= 2) { string lvar = i[0].Trim(); if (float.TryParse(i[1].Trim(), out float newValue)) { // Send command to update LVAR Offset<string> setLvar = new Offset<string>(0x0D70, 256); You'll end up with hundred of these, all being processed at the same time which will easily exceed the data limit for FSUIPC. Offsets should only be declared once, usually at the class level, and then reused. I have no immediate plans to make the library async. If you want async behaviour on the Process() call you can create and await a new Task... await Task.Run(() => FSUIPCConnection.Process()); Paul
  13. 3.3.15-beta3 is now on NuGet. This should now be pretty solid in terms of thread-safety. Paul
  14. Sure. I can probably get it done tomorrow. Paul
  15. I've have a quick look and there's probably more I can do. The airports collections might not behave well if the same collection is being accessed by two threads at the same time. I'll go through the rest of the airports database code and make any improvements needed. Paul
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.