Jump to content
The simFlight Network Forums

Struggling to assign L:Var to a controller button


Gehall1963

Recommended Posts

Hi John;

Maybe it's my 60 year old brain but I can't seem to work out the best method to assign an L:Var to a controller button.  I have used the WASM module to confirm the L:Var name and have been able to activate the L:var to confirm it does what I want.  Where I'm stuck is getting from there to something I can assign to a switch.   I have been studying the advanced manual sections on Offsets, WASM, Custom Events and Calculator Codes but nothing is quite clear.

I have tried adding an offset per below but can't figure out how to control that offset with a switch.

[LvarOffsets.Hawker Hunter]
1=L:StarterMaster=0xA000

Any help would be much appreciated, I am a huge fan of FSUIPC and use it for FSX and MSFS.

Thanks

Glen

 

 

Link to comment
Share on other sites

Hi John;

No need to respond, I have it working now, I was on the right track assigning an offset and thanks to user "mk2022" and an earlier post I now understand about the "Offset Byte Togglebits" and "Offset Byte setbits" etc that are under the Control to be set.

Cheers

Glen

 

Link to comment
Share on other sites

On 12/31/2022 at 10:41 PM, Gehall1963 said:

I have tried adding an offset per below but can't figure out how to control that offset with a switch.

[LvarOffsets.Hawker Hunter]
1=L:StarterMaster=0xA000

Any help would be much appreciated, I am a huge fan of FSUIPC and use it for FSX and MSFS.

First, that lvar-to-offset definition us not valid - you also need to specify the size/type. Presuming that lvar holds an integer in range 0-255 (probably just 0 or 1, no?), then add it as an unsigned byte, i.e.

Quote

[LvarOffsets.Hawker Hunter]
1=L:StarterMaster=UB0xA000

Then you can assign your button to Offset Byte Togglebits, giving A000 as the offset and 1 (or x1) as the parameter, as explained in the Advanced User guide.

John

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.