abax2000
-
Posts
79 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by abax2000
-
-
Lua Window
pls see attached file (saved as .txt in order to be uploadable). Besides the window positioning, everything else is working as advertised. I call the routine with a keypress.
I have included both the lines I used to log the default window coordinates and the line to define new position. Both unsuccessful.
I also try to get IAS at 50ft logged and displayed, but need more studying and trials, so it is not included in this version.
Tiller
I really feel embarrassed. I found the pages you pointed and all is fine now. I also visited my ophthalmologist; all is not fine in this front.
-
Two totally different issues in one post. Need help for both. (FSX sp2 + registered FSUIPC 4.743)
Lua window
I am trying to position the Lua window somewhere conveniently on the screen, but I cannot get the 'State, x,y,cx,cy = ipc.getdisplay()' routine to log the default values in the logfile. I am always getting 0's for all (5) variables.
As a shortcut, I tried to use "random" figures in 'ipc.setdisplay(x,y,cx,cy)' but the window does not change its place (I am using as a starting point the figures in "Window.LUA display" section of FSUIPC4.ini).
Most probably I mess up the syntax. Could anyone please advise on correct use?
Rudder assignment
I failed to find a solution through the FSUIPC documentation, as it seems to be more than I can chew.
I use Saitek X52 and ProFlightRudder pedals. I am trying to find a way of using the joystick twitching for steering while on ground, and the pedals only in flight. Default FSX setup of course does not permit that, as the pedals are assigned as rudder.
Is there any way to do this using FSUIPC functionality?
Lua window / rudder assignment
in FSUIPC Support Pete Dowson Modules
Posted
You are right in that I had not realised that the figures are in screen pixels.
I run FSX in windowed mode on a 1920*1080 monitor. So, I corrected the script as follows:
function logvs(off, val)
if val ~= 0 then
-- if on ground flag just set, get VS, convert it and log it
vs = ipc.readSD(0x030C)
vs = vs * 60 * 3.28084 / 256
ipc.log("Vertical speed at touchdown = " .. vs)
gs, tas, ias = ipc.readStruct(0x02B4, "3UD")
ias = ias / 128
ipc.log("IAS at touchdown = " .. ias)
ipc.display ("Vertical speed at touchdown = " .. vs.."\nIAS at TD ="..ias)
ipc.setdisplay(240, 240, 226, 112)
end
end
-- set to call above routine whenever "on ground" flag changes
event.offset(0x0366, "UW", "logvs")
I tried different numbers and different positions within the script of ipc.setdisplay with no luck; still the LuaWindow pops up at the default position at the center of the windscreen.
The .ini file records the following if that helps:
[Window.LUA display]
Docked=7413, 3273, 3537, 2435
Undocked=875, 874, 250, 110