Sergiohst Posted April 25, 2021 Report Posted April 25, 2021 Hi! I'm following your development of your wasm module to add Hvar/Lvar access to fsuipc , any plan to make it possible to set HVAR from .net SDK?? Thank you!
Paul Henty Posted April 25, 2021 Report Posted April 25, 2021 I've had a quick look at John's WASM C DLL and have successfully connected to it from my .net DLL. Over the next few days I will add a proper module to my dll that will (hopefully) allow fast access to LVars and HVars. The only potential problem is that I don't have MSFS so I can't test or debug anything here. I'll post here again when a beta is ready for testing. Paul
Sergiohst Posted April 25, 2021 Author Report Posted April 25, 2021 Fantastic news! Thanks! I'll try running against MSFS when you publish the beta and post results.
Paul Henty Posted April 27, 2021 Report Posted April 27, 2021 Hi, The beta is now available on NuGet (3.2.1-Beta) (remember to tick the box to 'include pre-release'. Documentation is here: https://forum.simflight.com/topic/92372-added-support-for-lvarshvars-access-in-msfs-via-john-dowsons-wasm-module/ Paul
Sergiohst Posted April 27, 2021 Author Report Posted April 27, 2021 Hi Paul! It looks promising! thanks! but it's not working as intented or I'm doing something wrong: WASM module is installed, executed John's client to test: But after INIT inside .NET:
Sergiohst Posted April 27, 2021 Author Report Posted April 27, 2021 continue previous post, due to file size limit
Paul Henty Posted April 27, 2021 Report Posted April 27, 2021 You need to call Start() sometime after Init(). Sorry, I completely left that out of the other post. I'll go and fix it now. If you're using LVars as well then you'll also need to call RefreshData() periodically to get the latest values. Paul 1
Sergiohst Posted April 27, 2021 Author Report Posted April 27, 2021 even though is stated in your post that it doesn't depend on FSUIPC connection, I've tested it after Fsuipc connection, to be sure:
Sergiohst Posted April 27, 2021 Author Report Posted April 27, 2021 Hi ! Sorry I saw your post after posting my last image 😄 , I'll try with Start(), Thank you!!
Sergiohst Posted April 27, 2021 Author Report Posted April 27, 2021 With an Start and Reload just after INIT, it didn't get Hvars, but I've put another Reload after a button click and it worked fine! so it must be some time after initialization . It's reload needed? maybe if preconfigured refresh rate time passed it's not.
Paul Henty Posted April 27, 2021 Report Posted April 27, 2021 I'm not sure why this is happening, or how long you should wait. I'll ask John about it. Paul
Paul Henty Posted April 28, 2021 Report Posted April 28, 2021 Hi, John has confirmed that the delay between calling Reload() and the HVars being available is to be expected. It takes time for the WASM module to gather the data from the files and do it's housekeeping. A few seconds should be enough. I'll update the documentation to make this clear. By the way, Start() called Reload() internally so you shouldn't need to call it yourself. Another point John raised is that there can also be a delay between writing a new LVar value and that value being set in the sim and read back by the WASM module. Because of this I'll need to change the value setting to be on a method (SetValue) instead of setting the value property. Paul
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