Dirk98
-
Posts
154 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by Dirk98
-
-
Yes, ShowText has for a long time been the way to show things like the RC menu on a Client. AdvDisplay was made obsolete by FSX and the Window display option in FS took over in both FS9 and FSX.
There's a Lua plug-in which does something similar to ShowText -- it's actually used as the example of the Lua wnd library in the Lua library documentation.
If you prefer to use ShowText then you'd need to have a plug-in which read one location (the VAS) and wrote a text string, like those in the examples above, to the FSUIPC text display area. However, you should note that there is only one such area, so it would overwrite things like your RC menu display.
The value of any FSUIPC offset can be shown. You just have to read it (using the appropriate ipc.readXXX function, where XXX defines the size and type), format it into correct units and characters, using Lua arithmetic and the "string.format" function, and display it as shown in the examples above. In fact there are examples of all that there for you.
Pete
All is clear, It's like getting a fishing pole instead of free fish, and still free :)
Thank you, Pete.
Dirk.
-
All is clear.
Thank you, Pete.
Dirk.
-
I've edited my last post.
Dirk.
-
Pete,
Definitely I was asking about a display on a Client. Actually I was running ShowText.exe by R. van der Wiele, that says in the readme:
Version 1.1
This little program works in combination with the program AdvDisp of PeterDowson (version 1.30 and higher) and will show the text displayed on AdvDisplayon an other PC connected via a network FSUIPC / WideFS.The Glas Cockpit software of Project Magenta (Enrico Schiratti) will also showthis text. So this program is intended for anybody who doesn't use this softwareor wants to display the text on a different position.A .ini file will be created when the program is run for the first time where all theoptions will be saved (in the same directory where you put ShowText.exe). Noentries will be written in the registry.It has a number of options:SwitchesActive - on /offTitle Bar - on/off (When title bar on, border is also on)Border - on/off (When border switched off, title bar is switched off also)Word wrap - on/offStay on Top - on/offConfig DialogAlignment of text:Horizontal - Left/Center/RightVertical - Top/Center/BottomTimer Interval:This value specifies how often the program will check for text changes.(1000 ms = 1 sec).Sound File:A sound file (.wav) can be selected or cleared with the buttons next to the field.This sound file will be played when there is a message coming in from theAdvDisplay program. The sound will only be played when there was no messagedisplayed, so when there are 2 messages coming in after each other the sound isonly played once.Remarks:
Move windowWhen no tltle bar is displayed it is still possible to move the window around, justleft click (and hold down) in the window and drag.StartupIt is possible to start the program in an active state (program will try to get textfrom AdvDisplay via FSUIPC/WideFS) before WideClient on Client PC is runningor FS on the server PC. ShowText will detect this situation and will establish alink when possible.Window position/optionsThe window position will be saved as well as all the options when stopping theprogram via the 'exit ' menu.The program has AdvDisplay.dll in the folder, but turns out it also shows text from RC4 even if AdvDisplay.dll is not there, I've just checked. Sorry for the confusion. (Edit: also this shows my own ignorance, re dll on a client lol, sorry!!)Also, lastly, is it possible to show the current vc zoom number in one of those Lua?Much thanks,Dirk. -
w = wnd.open("My Display", WND_FIXED, 30,300,217,50) wnd.backcol(w, 0x000) wnd.textcol(w, 0x0f0) wnd.font(w, WND_ARIAL,-2,WND_BOLD) -- Update the display at 500 msec intervals (see event at end) function mytimer(time) wnd.clear(w) fr = ipc.readUW(0x0274) if fr ~= 0 then fr = 32768/fr end fr = math.floor((fr * 10) + 0.5)/10 mem = ipc.readUD(0x024C) memmb = math.floor((mem/1024) + 0.5) wnd.text(w, "Frame Rate " .. fr .. " fps\nMemory free " .. memmb .. " Mb") end -- Adjust timing to taste: 500 = 1/2 second event.timer(500, "mytimer")
or:
-- Create the display window for 2 values, position x=800, y=400 h = display.create("My next display", 2, 800, 400) -- Update the display at 500 msec intervals (see event at end) function mytimer(time) -- display 1 = frame rate fr = ipc.readUW(0x0274) if fr ~= 0 then fr = 32768/fr end fr = math.floor((fr * 10) + 0.5)/10 display.show(h, 1, "Frame Rate " .. fr .. " fps") -- display 2 = memory left free mem = ipc.readUD(0x024C) memmb = math.floor((mem/1024) + 0.5) display.show(h, 2, "Memory free " .. mem .. " kb (" .. memmb .. " Mb)") end -- Adjust timing to taste: 500 = 1/2 second event.timer(500, "mytimer")
Or:
w = wnd.open("My third display", 2) wnd.backcol(w, 0x000) wnd.textcol(w, 0x0f0) wnd.font(w, WND_ARIAL,-2,WND_BOLD) -- Update the display at 500 msec intervals (see event at end) function mytimer(time) wnd.clear(w) fr = ipc.readUW(0x0274) if fr ~= 0 then fr = 32768/fr end fr = math.floor((fr * 10) + 0.5)/10 mem = ipc.readUD(0x024C) memmb = math.floor((mem/1024) + 0.5) wnd.text(w, "Frame Rate " .. fr .. " fps\nMemory free " .. memmb .. " Mb") end -- Adjust timing to taste: 500 = 1/2 second event.timer(500, "mytimer")
Please yourself. Adjust at will.PeteI'd like to be able to control font name and size in Lua #2 as well. How can it be done there?
Thanks,
Igor.
Perhaps it's the best Lua example for my needs, but the font is huge there.
PS: also, please, I'd like to add current (dynamic) Zoom in "display 3" to Lua#2/ Thanks!!!
-
One of those three Lua programs has a re-sizeable and positionable window, and you can easily change the default size and position -- just look at the code. AdvDisplay is a long dead FS module which doesn't run on a client, it used to be part of the FS9 (and before) process. I hope you aren't still using that!
Pete
Pete, the window is resizeable indeed (not scalable though), unfortunately it seems there's no word wrap that can be really useful when resizing directly with the mouse (convenient!).
Thanks,
Dirk.
-
One of those three Lua programs has a re-sizeable and positionable window, and you can easily change the default size and position -- just look at the code. AdvDisplay is a long dead FS module which doesn't run on a client, it used to be part of the FS9 (and before) process. I hope you aren't still using that!
Pete, how come?! I'm still using it very well in FSX with RC4 on my networked PC. What would you suggest using instead? What is bad about it and how can it be replaced if you recommend to?
Thanks,
Dirk.
-
Strange but true: I created 3 Lua files kindly suggested by Pete and named them: VAS.lua1 , VAS.lua2 and VAS.lua3 as I wanted to switch between them by renaming each to VAS.lua when needed. Turns out WideFS reads *.lua1 , lua2 and lua3 extensions as well, simultaneously.
Cheers,
Dirk.
-
I've tried the 1st lua and it works, great.
Is it possible to display the info in AdvDisplay though? It is easier to resize and place ontop all other opened windows.
Thanks,
Dirk.
-
Thank you so much, Pete!
Dirk.
-
Now, :) , how is it possible to port the display of VAS number to ShowText window via WideFS?
Thanks,
Dirk.
-
Now that I'm using AutoAssignLetters=Yes under [JoyNames] in FSUIPC4.ini I can' figure out how to name my "B" joystick in the lua scripts.
It used to be, for example, "0" as in:
envent.button(0, 5, 1, "toggleFD")
Now it is "B" in FSUIPC GUI (also due to some additional usb input devices)
I tried "B" and "2" in the script in place of "0", but that does not work. Any idea?
Much thanks,
Dirk.
>>> If you use joystick lettering, you can put the letter here instead but it must be "" quotes, as a string.<<< The IPC Library.
Dirk.
-
Now that I'm using AutoAssignLetters=Yes under [JoyNames] in FSUIPC4.ini I can' figure out how to name my "B" joystick in the lua scripts.
It used to be, for example, "0" as in:
envent.button(0, 5, 1, "toggleFD")
Now it is "B" in FSUIPC GUI (also due to some additional usb input devices)
I tried "B" and "2" in the script in place of "0", but that does not work. Any idea?
Much thanks,
Dirk.
-
Guys, did anybody check fuelburn in PMDG737NGX or iFly737NGX with this dynamic friction? Do you use it with these planes?
Thanks,
Dirk.
-
Are you in the air then? Doesn't that tell you? It isn't complicated. You seem to be making it so. Air = you are in the air, Ground = you are on the ground!!!
Right! :D
To some reason I thought Ground / Air referred to AI not myself.
Thank you very much.
Dirk.
-
As documented in the Advanced user's guide. Just change the name.
The default Zapper works well for me. Otherwise please yourself. The parameters are documented.
Regards
Pete
Pete, I posted my question after reading this:
ZapSound: This defines the sound to be used when the FSUIPC control for AI traffic deletion (the “Traffic Zapper”) issuccessfully applied. This must be the name of a WAV file in the FS sound folder, the default being ‘Firework’.
If you do not want a sound just set it to ZapSound=None. However, the reason for the sound is so that you know
something has been Zapped. FSUIPC cannot tell what you can see, and the aircraft which is zapped may not be in your
display so you may not see it disappear.
So, would ZapSound=piston_fail.wav be right format wise?
By "default Zapper" you mean Traffic Zapper I guess? So, when you are on final and ai is on your runway below, is it affected by ZapAirRange=1.5 or ZapGroundRange=0.25 when using Traffic Zapper? I'm trying to figure out which value to play with for this situation.
Thank you,
Dirk.
-
All within range, as opposed to only the nearest one.
Oh, I see.
Thanks,
DIrk.
-
It looks like Zapall is also dependent on the default values:
ZapAirRange=1.5
ZapGroundRange=0.25
I thought "all" was like all. :)
Thanks,
Dirk.
-
Hello,
Is ZapSound On by default?
Yes it's On and it sounds real good, like playing a third person shooter.
Which is the right facility and values to use for zapping ai on your runway when you are landing on final?
Thanks,
Dirk.
-
Hello,
Is ZapSound On by default? Also, if I want to change it from firework.wav to say piston_fail.wav what is the correct format?
Thanks,
Dirk.
-
Yes, I thought that was it.
Thank you, Reinhard.
Dirk.
-
Hi,
I added an alternative template for the FD using explicit values. Replace the variables and values acording to your need. But as these are basic programming tasks, I would suggest to read the LUA reference manual and especially try to understand the includes samples with the LUA package.
Rgds
Reinhard
-- toggle FD button
function toggleFD (joynum, button, downup)
local lFD = ipc.readLvar("L:AB_MPL_FD")
if lFD == 0 then
lFD = 1
else
lFD = 0
end
ipc.writeLvar( "L:AB_MPL_FD", lFD )
ipc.writeLvar( "L:SmallOverheadPushButtons", 1 )
end
[/CODE]Yes! Thank you very much, Reinhard, I've got to modify my lua as this version looks more logical to me)
Dirk.
PS: I wonder what this string meant in a verbal description (after ipc.wrtieLvar, the " - " part):
[color=#000000]ipc[/color][color=#666600].[/color][color=#000000]writeLvar[/color][color=#666600]([/color][color=#000000] [/color][color=#008800]"L:AB_AP_HDGTRK"[/color][color=#666600],[/color][color=#000000] [/color][color=#006666]1[/color][color=#000000] [/color][color=#666600]-[/color][color=#000000] ipc[/color][color=#666600].[/color][color=#000000]readLvar[/color][color=#666600]([/color][color=#008800]"L:AB_AP_HDGTRK"[/color][color=#666600])[/color][color=#000000] [/color][color=#666600])[/color]
[color=#666600]PPS: I'm like an addict on your scripts already, bAd feeling, strong craving. :)[/color]
-
Reinhard,
As I wrote I'm using your examples of scripts as templates for some other functions and controls in AXE. But as I think I already understand a little more in those scrips now, than when I started in this thread, I realize that some of them may not be very approriate for what I'm trying to achieve, due to different reasons, even when they seemingly function ok.
For example, you suggested these scripts for toggling FD and ATHR:
-- toggle FD button
function toggleFD (joynum, button, downup)
ipc.writeLvar( "L:AB_MPL_FD", 1 - ipc.readLvar("L:AB_MPL_FD") )
ipc.writeLvar( "L:SmallOverheadPushButtons", 1 )
end
-- toggle ATHR button
function toggleATHR (joynum, button, downup)
ipc.writeLvar( "L:AB_AP_ATHR", 1 - ipc.readLvar("L:AB_AP_ATHR") )
ipc.writeLvar( "L:SmallOverheadPushButtons", 1 )
end
-- register the buttons of your joystick triggering the functions
-- replace joyletter by the actual used letter/number, also replace buttonX by the actual value
event.button("joyletter", button1, 1, "toggleFD")
event.button("joyletter", button2, 1, "toggleATHR")
These examples are good for templates of toggling buttons that function On/Off. But they may be not so good for mode switching buttons like how I tried to adopt them for in SPD/MACH and VS/FPA switching:
-- VS/FPA switch button
function switchHDGTRK (joynum, button, downup)
ipc.writeLvar( "L:AB_AP_HDGTRK", 1 - ipc.readLvar("L:AB_AP_HDGTRK") )
ipc.writeLvar( "L:SmallOverheadPushButtons", 1 )
end
-- SPD/MACH switch button
function switchSPDMACH (joynum, button, downup)
ipc.writeLvar( "L:AB_AP_SPDMACH", 1 - ipc.readLvar("L:AB_AP_SPDMACH") )
ipc.writeLvar( "L:SmallOverheadPushButtons", 1 )
end[/CODE]From AXE LVars list:
HDGTRK can be:
1 = TRK/FPA, 0 = HDG/SPD
SPDMACH can be:
1 = MACH, 0 = SPD
So, is there a different way to skin this cat, by explicitly using 1 and 0 switches in the scripts above?
Thanks,
Dirk.
PS: I mean, what if they were not 1 / 0, but rather 1 / -1? Would have the main script body above been valid yet?
-
ZapAirRange=1.5
ZapGroundRange=0.25
These control the range of operation of the AI aircraft zapping facility. The units are nautical miles. Air and Ground
refer to the user aircraft position, not the target. Note that you cannot change the acceptance angle explicitly. It is
adjusted automatically, in linear inverse proportion to the change in the range—so with a larger range you would need to
point the aircraft nose more accurately.
Do I add the above to [General] section manually?
Thanks,
Dirk.
PMDG: How to assign "A/P disengage" to joystick button?
in FSUIPC Support Pete Dowson Modules
Posted
Bingo! I was just to post the same question. In PMDG_NGX_SDK.h:
//Yoke Animations
#define EVT_YOKE_L_AP_DISC_SWITCH (THIRD_PARTY_EVEN_ID_MIN + 1004)
#define EVT_YOKE_L_AP_DISC_SWITCH (THIRD_PARTY_EVEN_ID_MIN + 1005)
So the rest is like Pete explained already (thank you so much!!!)
Now I'm looking for the A/T disconnect button on the throttles.
Any idea?
Thanks,
Dirk.