Jump to content
The simFlight Network Forums

Can't change LVar value


Recommended Posts

Actually i can change it, but the LVar gets reset very quickly:

#!/usr/bin/env lua

ipc.writeLvar("L:EmbBatt2", '1')
value = ipc.readLvar("L:EmbBatt2")
ipc.display(value)
ipc.sleep(5000)

I ran this code using a keypress, and instead of remaining on position 1, it rollsback to position 0.

BATT.gif.ed919cb92229ec18c637fbd38b48d0f2.gif

Gif may have cutted some frames..

Link to comment
Share on other sites

3 hours ago, Ygor Montenegro Araújo said:

i can change it, but the LVar gets reset very quickly:

Then that is the way the lvar works. What switch/function for what aircraft are you trying to assign? Have you checked the MF HubHop resource to see if there is a preset available? 

 

Link to comment
Share on other sites

On 4/8/2022 at 6:03 AM, John Dowson said:

Then that is the way the lvar works. What switch/function for what aircraft are you trying to assign? Have you checked the MF HubHop resource to see if there is a preset available? 

 

I'm using the Feelthere's E190 for P3D V5. Trying to switch the position of BATT 2 from OFF to AUTO but it seems that something is forcing the switch back to OFF. Never used MF HubHop.

Edited by Ygor Montenegro Araújo
Link to comment
Share on other sites

15 hours ago, Ygor Montenegro Araújo said:

Never used MF HubHop.

No, sorry - that resource is for MSFS2020, and not relevant to P3D aircraft.

Try activating logging and flip the switch to Auto in the UI to see if any controls/event  are logged. Maybe you need to use an event in conjunction with setting the lvar value. And check what the lvar value is when the switch is in the auto position. Other than that I can't really advise as I don't have this add-on.

John

Link to comment
Share on other sites

7 hours ago, John Dowson said:

No, sorry - that resource is for MSFS2020, and not relevant to P3D aircraft.

Try activating logging and flip the switch to Auto in the UI to see if any controls/event  are logged. Maybe you need to use an event in conjunction with setting the lvar value. And check what the lvar value is when the switch is in the auto position. Other than that I can't really advise as I don't have this add-on.

John

I've found a var named "EmbBatt2" with "Click" in the end. If I set to "-1" it reduces the position, and if I set it to "1" it increases the position.

I will have to set a routine via lua in order to the LVar correspond to the switch position, not the ideal, but is a beggining.

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.