Jump to content
The simFlight Network Forums

Paul Henty

Members
  • Posts

    1,652
  • Joined

  • Days Won

    74

Posts posted by Paul Henty

  1. Hi Peter,

    I don't know what could be causing this. It's working here with FSX/Windows 10.

    Sometimes third-party add-on aircraft don't use the standard FSX data for radios and fuel, but I see you've tried many aircraft. I assume that includes the default aircraft.

    Could you please enable the IPC Read and IPC Write logging in the Logging tab of FSUIPC. Then try the Fuel and radios again, shut down the sim and paste the log here. The log will be called FSUIPC4.Log in the Modules folder under the main FSX folder. That might give me some clues.

    Paul

  2. 1 hour ago, John Dowson said:

    However, doesn't his client/your library, also require the FSUIPC SDK, and so also FSUIPC to be running (or, on a slave PC, WideClient)?

    Or can he use a version of your client libraries for WAPI access that doesn't use the FSUIPC SDK?

    In my library the WAPI access is independent of the FSUIPC SDK. It can be used without a connection to FSUIPC.

    20 minutes ago, achilleghilotti said:

    In code if I use FSUIPCConnection.WriteLVar ("L: A32NX_ECAM_SD_CURRENT_PAGE_INDEX", CDbl (4)), it works.

    That's using FSUIPC/WideFS so nothing to do with SimConnect on the client machine.

    21 minutes ago, achilleghilotti said:

    If I do the test with WASMClient everything works, I read Hvar.

    Do you mean this works on the remote (Client) PC or the MSFS PC?

     

    15 minutes ago, achilleghilotti said:

    Me.VS.SimConfigConnection = 0

    I think this is to select different connections set up within the SimConnect configuration file. So in the SimConnect file you can have a local connection (0) and a remote connection (1).

  3. Hi Marc,

    You've declared these an standard read/write offsets (WriteOnly set to false). They will only send values if the value you sent is different from the current value (at last process()).

    If you want to send these values even if the current values are the same, you need to make them WriteOnly (set last boolean parameter to true). That way the offsets will write the value on every process. You won't be able to monitor the values with these offsets however.

    If you do want to monitor them and only send the values only when you detect a pause or different sim rate then leave them as read/write, but note that the DLL won't bother to write the values that haven't changed. e.g. if the user pauses, it won't send the simrate or slew mode.

    Earlier versions of the DLL did behave slightly differently in this regard, but it didn't really work properly so I had to fix it. I suspect you wrote this feature using one of those earlier versions and you're now seeing a different behaviour.

    Paul  

  4. Hi John,

    One of my users reported problems with the MSFSVariableServices not working after stopping and restarting. I've confirmed this but then found it also happens with your client exe.

    This is for WASM Module 0.5.5. with the DLL and client from the 0.5.5 zip file.

    To reproduce the problem:

    1. Load any flight and be ready to fly
    2. Run the wasm client and select start
    3. Get the value of any LVAR, change the control in the sim and then get the new value. This works okay.
    4. Select stop in the client
    5. Then start again
    6. Get the value of the lvar again. Change the control in the sim. Get the LVar value again. This time it hasn't changed and gives the same value as before.

    There are wasm logs in the original thread if you want to see (linked below), but basically after restarting the log just repeats

     [TRACE]: Config data requested...

    Paul

     

     

  5. Quote

     it looks like that update callbacks don't work once fsuipcw_end() has been called, when used from a WPF app.

    Yes, that looks to be the problem. From the logs you have posted it looks like the cause of this is the WASMIF module not receiving the simconnect data from the WASM module after end() has been called. The LVARS you get are probably cached from before. I'm guessing the values won't be updated. 

    Quote

    Does that fit with what FSUIPCClientDLL is doing under the hood?

    Yes, my DLL relies only on the callbacks so everything is even driven.

    The mystery is still why this is different in WPF.

    I'll get month of MSFS so I can test it here and do some debugging and step through Johns DLLs and Libs. I'll report back over the weekend.

    Paul

  6. The garbage collection is cleaning up the instances of MSFSVariableServices that you nulled, so those errors are to be expected.

    The failure to connect on a new instance doesn't really give any more information.

    I notice that the WASM module is now up to 0.5.5. I think it would be worth updating to the latest version.

    Remember you need to update the FSUIPC_WAPID.DLL and the WASM module running in MSFS. The easiest way to get the new WASM module is to install the latest FSUIPC but it can be installed manually from the WASM Zip file. (http://fsuipc.com)

    Paul

  7. Yes it looks like after the restart the WAPI module isn't receiving any SimConnect messages.

    Can you try setting your variableServices variable to null after you call stop. That way it'll make a new instance and register everything with the WAPIID.DLL again. If that works then it might narrow the problem down to the client side libraries rather than the WASM module or a simconnect.

    Paul

     

  8. Creating multiple instances of MSFSVariableServices isn't going to work unfortunately. This feature relies on John's FSUIPC_WAPID.DLL which only supports one instance of the WASM Client.

    With hindsight it was a poor design choice on my part to make MSFSVariableServices a normal class. This implies that it can be instantiated multiple times. I should have made it a static class. I might change this in a later version. Or I might think about forking the FSUIPC_WAPID.DLL and amending it so that it can handle multiple WASM Clients.

    For your application I suggest creating a single instance of MSFSVariableServices in your application and use that same instance in any forms you need to. The easiest way to do this would be through a static class or a static property on your main form if you have one.

    You can register different listeners inside each form and that will work fine. But the init(), start() and setting update frequencies etc must only be done once for that single instance.  You should also remove any listeners you have registered when your forms close.

    Paul 

  9. I'm not sure as I don't use websockets for any real world applications. Could it be a timeout? If you're letting the connection go idle for a while and it disconnects after a set amount of time, this would point to a timeout somewhere (server or client).

    If it's random when the socket is in use then I'm not sure what could cause this. 

    Does it also happen with the examples on the website?

    Paul

  10. 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

  11. Offset 0x0C18 contains the units of measure. I don't know if this is working for FSUIPC7/MSFS yet. The FSUIPC7 spreadsheet has this marked as untested, but you should try and see if it works.

    This offset is read-only however so you won't be able to change it. I don't think there is any way to change this with FSUIPC.

    Paul

  12. Float is correct for 0x6010/8 because the data is stored as a float. There is no need to use lon/lat for these anyway because the data is already in decimal degrees.

    0x0560/8 have the data stored as integers, so you need to either use the int type and do the conversion yourself, or use lon/lat type and let the server do it for you.

    You're mixing up two different types of offsets. 

    If you're going to read and write then just use 0x0560/8 with the lon/lat data types.

    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.