Jump to content
The simFlight Network Forums

Recommended Posts

Posted

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.

Posted

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

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
Posted

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

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.