Jump to content
The simFlight Network Forums

Assigning switches using Local panel variables (lvars) for the Milviz Bell uh1 redux (FSX)


Recommended Posts

Posted

 

Hi 

I have an aircraft that has switches that I would like to assign to my cockpit but after running the logging console window non of the switches show any command when I move the switch in the 3d cockpit.

I ran list local panel variables and the log files shows up lots of commands.

I have made a macro file and managed to go through  and get several switches working and moving in the 3d cockpit and doing that they should 

One switch however I just can't seem the locate.

Is it possible that while I can move the switch with the mouse in the 3d cockpit, it is not located in list local panel variables with all the other commands.

Cheers 

Rhys 

Posted
On 10/23/2025 at 6:54 AM, Reco said:

Is it possible that while I can move the switch with the mouse in the 3d cockpit, it is not located in list local panel variables with all the other commands.

Listing the lvars does just that - it lists all the local panel variables available. You then have to determine if any are relevant to the switch you are trying to control. You list the lvars two or three times, with the switch in different positions and see if any of the values change.

16 hours ago, Reco said:

Sim is fsx se the  aircraft is the now freeware Milviz Bell uh1 redux.

Ok - and what switch are you looking at? As its freeware, I can install it and take a look, but it will take me a couple of days before I will have time to do this. I am just back after a couple of days away and need to catch-up on a few things first.

John

Posted

Hi John

I can send you the freeware fsx se version Installer I have found on my old PC.

I thought the newer version at Blackbird freebies was an updated version for fsx se but it was only for p3d.

I can add a image of the switch on the panel which I am having trouble with.

Let me know  the best way to send you the file

 

Regards 

Rhys

 

Posted

Hi John

Thanks heaps for your help. with some perseverance I created a new macro and placed all the switch commands into it and eventually found the correct one.

I have also been able to assign switches in another aircraft using the local panel variables that in the  past could not assign

Cheers 

Rhys 

Posted
9 hours ago, Reco said:

Thanks heaps for your help. with some perseverance I created a new macro and placed all the switch commands into it and eventually found the correct one.

Great - well done! Maybe you could attach your macro file for the Milviz Bell uh1 redux as it may be useful for other users (I will also update the title of this thread).

John

  • John Dowson changed the title to Assigning switches using Local panel variables (lvars) for the Milviz Bell uh1 redux (FSX)
Posted

Hi John

Here is the file, but might need your help on 2 things if are able to. 

One switch I just can not seem to find in the variables list 

Plus the collective throttle shows up as  85859  ( L:UH1_THROTTLE = 0.000000) as the throttle is a axis and not a switch I am not sure what to do.

In axis assignments I have mapped my collective throttle to pro pitch1 and when I rotate it, the engine spools up but the collective throttle in the 3d cockpit sits in the idle position

so I have to use the mouse to rotate the collective throttle to  get the N2 needle gauge to get to full for take off 

Pm a email and I can send you the files

Cheers 

Rhys

Bell_UH1C.mcro

Posted
8 hours ago, Reco said:

Plus the collective throttle shows up as  85859  ( L:UH1_THROTTLE = 0.000000) as the throttle is a axis and not a switch I am not sure what to do.

To assign an axis to control an lvar, you need to use lua. You assign your axis to write its value to an offset (using 'Send to FSUIPC offset').
You then need a lua script, which should run automatically via a [Auto.xxx] section in your FSUIPC4.ini (where xxx is your profile name). The lua script monitors the offset to which you have assigned your axis, using event.offset, and in the event handling function you calibrate the axis value (given as a parameter to the handling function) to the lvar value range, and set the lvar using ipc.writeLvar. Try this and let me know if you have issues and I can help further.

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.