Jump to content
The simFlight Network Forums

Set HVAR from .net SDK


Recommended Posts

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 

Link to comment
Share on other sites

 

Snag_2e48ffc.png.c1be08234721b83b686da09b687a9765.png

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.

 

Snag_2e749bd.png.00ca486b4e5269052ebadc5721769add.png

 

 

 

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.