Jump to content
The simFlight Network Forums

Lvar read for FBW A320


Recommended Posts

Hi there,

I have an ACARS application and various users are reporting an issue that the park brake is no longer detected for the FBW A320 in MSFS.

I am looking to update the application (if possible) to read from the Lvars for the park brake which I believe is A32NX_PARK_BRAKE_LEVER_POS.

However, when doing so it always returns 0 regardless of lever position.

I am using the latest FSUIPC and Paul's FSUIPCClient DLL (3.2.7).

I have essentially been trying to get the value using FSUIPCConnection.ReadLVar("A32NX_PARK_BRAKE_LEVER_POS").

Any help would be appreciated. This is a C# application.

Thanks.

Link to comment
Share on other sites

For c# questions using Paul Henty's dll, you should really post in Paul's sub-forum. I will move your post for you.

This can also occur if trying to read an lvar after opening a connection and before the lvar values have been received from the FS. To prevent this, you need to register for the update callback using the function
     fsuipcw_registerUpdateCallback
Lvars will be available to read once the registered callback function has been called.

If using a registered version of FSUIPC7, you (i.e. your users) can also try listing the available lvars and values using the Add-ons->WASM-<List Lvars... menu option.
This should give you a snapshot of available lvars and values.

Also, if using a registered version of FSUIPC7, it is possible to use the lvars-to-offsets functionality to populate a user offset with the lvar value, and then spoof the park brake position offset (0x0BC8) to the value held in the lvar offset. See the following post for details: 

 

John

Link to comment
Share on other sites

Posted (edited)

Thank you for the information, that makes sense.

Hopefully Paul would be kind enough to provide an example of how to use fsuipcw_registerUpdateCallback with his library as I am struggling to find any examples for this.

I call FSUIPCConnection.Process before FSUIPCConnection.ReadLVar("A32NX_PARK_BRAKE_LEVER_POS") when loaded in the sim with a test harness application but still reads a 0.

EDIT: I just found this thread 

Ill have a look into this first. Am i right in thinking to use WASM you need the registered version of FSUIPC7? If so, I will relay this information to the users.

Thanks.

Edited by myles841
Link to comment
Share on other sites

I have just noticed this:

4 hours ago, myles841 said:

I have essentially been trying to get the value using FSUIPCConnection.ReadLVar("A32NX_PARK_BRAKE_LEVER_POS").

That is the old method of accessing lvars via FSUIPC offsets. You should try the newer method using the MSFSVariableServices class. See 

 

John

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.