Hi Again,
I finally have this all working pretty well with the exception of a very noticeable lag in the lights that rely on the Lua script.
The direct FSUIPC offset lights work without delay but any of the lights that use lvars and therefor require a brief trip through my Lua script delay by
as much as 5 seconds before responding.
I am very new to Lua programming so I'm certain I'm doing something wrong. Can anybody provide some insight?
The VB.net code monitors the state of the FSUIPC offsets and operates the lights accordingly.
I have 8 lights which are operate on standard FSUIPC offsets and thus not used in this script. They operate without delay
Here is an example of the Lua script I am using.
There are actually 35 entries but they are all basically the same
while 1 do
n1 = ipc.readLvar("L:B200CFuelCrossfeed")
n2 = ipc.readLvar("L:B200CRvsNotReady")
n3 = ipc.readLvar("L:B200CLBld")
n4 = ipc.readLvar("L:B200CRBld")
if n1==1 then
ipc.writeUB(0x66C0, 1)
else
ipc.writeUB(0x66C0, 0)
end
if n2==1 then
ipc.writeUB(0x66C1, 1)
else
ipc.writeUB(0x66C1, 0)
end
if n3==1 then
ipc.writeUB(0x66C2, 1)
else
ipc.writeUB(0x66C2, 0)
end
if n4==1 then
ipc.writeUB(0x66C3, 1)
else
ipc.writeUB(0x66C3, 0)
end
ipc.sleep(50)
end
Thanks