Jump to content
The simFlight Network Forums
dagoston93

An efficient way to read a lot of L:Vars?

Recommended Posts

Okay, Attached is a picture of my situation. I  had to change the offset from 66CD to 66CF as, for some strange reason, was affecting 66CB. 66CB is used to be able to send alphanumeric characters to an FMC (actually its FS's default GPS500 with an CDU keypad).  It worked fine until I added this lvar-to-offset logic - then things went badly. I separated the logic and restored the original FSUIPCShow.lua and added spokes2112.lua. FSUIPCShow.lua now works as intended - whew. I copied the above example from spokes2112's lua, with the exception of using 66CF as the offset. As can be seen by the attached screenshot, 66CF is not receiving, thus not displaying the data - ugh!

 

Okay, figured it out. I guess I had an old version of FSUIPC (4.84) installed and it seems to not have the event.lvar option. I haven't had the need to update - until now. But shouldn't still there be a way to do this without the event.lvar option? If so, how?

Okay! Final update: I was looking at Lvar_vasFMC.lua and where is what I got working without the event.lvar (good because I primarily use FS9): I suppose the "while 1 do" was required. Now I can  "ipc.sleep" :) 

while 1 do

  FDValue = ipc.readLvar("L:CpitCmdrSetValue")
  ipc.writeDBL(0x66CF,FDValue)   
  ipc.sleep(50)

end

 

 

Lvar2OffsetNotWorking.png

Share this post


Link to post
Share on other sites

Well... sad to say, the above works great with FSX, but NOT with FS9. Hm... what could be the reason (the ipc.readLvar) not available in FS9's FSUIPC (v3.999z9)?

Well, don't I feel a bit silly. I had forgotten that I had assigned the throttle axis to 66D0. I did this so I could use the throttle axis to control up to 4 engine throttles, either together or separately as well as prop pitch, mixture, cowl flaps, flaps and spoiler. Re-assigned to 0x66E0 and all it well. 

 

Share this post


Link to post
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...

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