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

Posted (edited)
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.