Jump to content
The simFlight Network Forums

Looking for clarification on Lvars, SimConnect, WASM modules


Recommended Posts

Posted

I spent quite a bit of time reading and re-reading the relevant parts of the Advanced User manual, searching through forums etc., but I can't seem to wrap my head around the concepts.

Here's where I am: I have USB controllers with loads of switches, buttons, levers, and rotary encoders. They all work, but, so far, I can only assign them to the subset of functions available in FSUIPC, and many of those don't work as expected (no doubt Asobo is to blame for this).

Here's where I would like to be: I would like to be able to assign all my controls freely to specific buttons or knobs on, for example, KAP140, GNS530, or G1000.

A couple of forum posts which are about a year old discuss using MobiFlight (or, at least, MobiFlight's WASM module) together with FSUIPC as the solution, but I can't figure out whether that's still the way to go... is it? We do have FSUIPC's own WASM module now, is that meant to replace the need for the MobiFlight module or does it do something else?

Is there a relationship between Lvars and SimConnect events? Do they mirror each other? Can I achieve the same results using either? Or is manipulating Lvars a backdoor, circumventing the use of the actual button in the sim, by changing the state of add-on internals, and thus not what I want to look at?

Please make my brain hurt less.

 

Posted
4 hours ago, aurel42 said:

Here's where I would like to be: I would like to be able to assign all my controls freely to specific buttons or knobs on, for example, KAP140, GNS530, or G1000.

Most of the controls for these are using lvars, hvars or calculator code.

4 hours ago, aurel42 said:

A couple of forum posts which are about a year old discuss using MobiFlight (or, at least, MobiFlight's WASM module) together with FSUIPC as the solution, but I can't figure out whether that's still the way to go... is it? We do have FSUIPC's own WASM module now, is that meant to replace the need for the MobiFlight module or does it do something else?

You can use MobiFlight events with FSUIPC if you like, but you do not need to. If  you want to use the MobiFlight WASM module, event files for MobiFlight are provided in the EventFiles sub-folder of your FSUIPC7 installation. To use these, you need to move them to the main FSUIPC7 installation folder (i.e. up one level).  There are event files for the G1000, the GNS530 and the KAP140.

Alternatively, you can just use the lvars/hvars/calculator code theat the MobiFlight events use directly. There are various methods of doing this, all described in the user manuals and in various posts, but the general technique is the same. Take a look at the MobiFlight hubhop site (https://hubhop.mobiflight.com/) to see what a MobiFlight event uses, and depending on what that is you can either assign to a control, an lvar or hvar (using lvars-to-offsets functionality, macros or lua) or using calculator code (only available via lua at the moment).

4 hours ago, aurel42 said:

Is there a relationship between Lvars and SimConnect events? Do they mirror each other?

No, they are distinct. Simconnect events are also known as K events. Simvars are also known as A vars in gauge /calculator code.

4 hours ago, aurel42 said:

Can I achieve the same results using either?

Usually its one or the other, maybe a combination of both, or possibly using other variable types (hvars, bvars, etc) or complex calculator code. Take a look at the code for the presets in that MobiFlight hubhop site.

But really you need to look at the Asobo documentation and web resources for a full understanding if all the variable types and what they are used for.

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.