Jump to content
The simFlight Network Forums

ark1320

Members
  • Posts

    670
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by ark1320

  1. Hi Pete, If under the General button area of FSUIPC.ini I assign three functions (gear down and two Lua scripts) to button 19 as shown below, all works well. 450=PY,19,C66080,0 -{GEAR_DOWN}- 451=PY,19,CL95:R,0 -{Lua Landing_Params}- 452=PY,19,CL52:R,0 -{Lua AppchAltCalls}- However, if I make one of the Lua script assignments Profile Specific to aircraft A by moving it from the General area to aircraft A's button assignment area, only that script works for aircraft A, the two remaining button 19 functions under the General button area no longer work for aircraft A. I assume this is because in some sense I have made button 19 itself profile specific to aircraft A rather than just the associated Lua script. Do you see anything I can do to resolve this issue? Thanks, Al FSX, FSUIPC 4.971, Win10
  2. Hi Pete, Are the FSUIPC4 Offsets at the same locations in FSUIPC5? I'm trying to determine if it is reasonable to expect that most Lua scripts written for FSX using FSUIPC4 will run in P3Dv4 using FSUIPC5. Thanks, Al
  3. HUD Parameters for FSX HUDparameters.lua is a Lua script that displays flight parameters in a small text window that pops up when the script is selected by an assigned key or button if the aircraft is in the air. Parameters displayed are: · Indicated Airspeed (IAS. Kts) · True Airspeed (TAS, Kts) · Ground Speed (GS, Kts) · Mach# (when above a user settable altitude, currently 25000ft) · Altitude (ALT, ft) · Radio Altitude (RA, ft) · Vertical Speed (VS, ft/min) · Vertical Speed per Nautical Mile (VS/NM, ft/NM) · Attitude Indicator pitch (AI, degrees) · Flight Path Angle (FPA, degrees) The top of the script contains user settable values for the size and location of the display, the altitude above which the a/c Mach# will be displayed (default is 25000ft), the data update interval in milliseconds (default is 2000), and whether or not data is to be logged in HUDparameters.log (default is 0, off). These values can be set using a text editor like NotePad. A registered copy of FSUIPC is required to execute the Lua script. Simply copy the script to the Modules folder of FSX and use FSUIPC4 to assign a key, button or switch to toggle the script on and off. The script turns off if the aircraft is on the ground. HUDparameters.zip
      • 3
      • Upvote
  4. My understanding is FSW is built on FSX to some degree, but in general FSX addons, a/c, etc are currently not compatible with FSW. Al
  5. Hi Pete, Has DTG made any effort to coordinate with you regarding using FSUIPC with their soon to be released 64 bit FSW sim? If not, FSW is likely a non-player for me, Thx, Al
  6. Hi Pete, The documentation on event.offset() says "The function is also executed initially, when the plugin is first run, in order to initialise things". In my application, event.offset() is used inside a nested function. That is, function A calls function B, and event.offset is part of function B and calls function C when the offset changes. However, if I understand correctly, the initial execution of function C will happen the first time function B is called even if the offset has not changed value -- is that correct? Thanks, Al
  7. Pete -- thanks very much for the further explanation -- very helpful. A related question please: the event being monitored by event.offset() is the on-ground flag in offset 0x0366 which has a value of 1 when the aircraft is on the ground. If the aircraft bounces during landing, and thus is only on the ground for a small fraction of a second perhaps during the bounce, is there a reasonable chance the bounce will be 'missed' as far as the on-ground flag is concerned because of sim or script timing issues (e.g., the sim was busy doing other things when the bounce occurred and so the on-ground flag didn't change)? Thx, Al
  8. To clarify a bit, my situation is that the function called by event.offset() is logging aircraft data and may typically run for 8 to 10 seconds. During that time, the location being monitored by event.offset could change so as to trigger a second call to the same logging function while the first is still running, and thus my questions above. Thanks very much for the help. Al
  9. Hi Pete, I am using the command event.offset(offset, "type", "function-name) in a script that is listed under [Auto] in the FSIPC.ini.file. My questions are: 1. If the command makes two sequential calls of “function-name” and the first called function is still running when the second call occurs, are there now two instances of the function running, or did the second call terminate the first function? 2. If two instances of the called function would be running (which is what I think), what might be a good way to terminate the first function when the second call is made? Thx, Al
  10. Thanks Pete and Thomas, good info. Al
  11. Thanks for the info. Just to to clarify, I assume that, in general, editing changes made directly to the FSUIPC.ini after FSX has loaded will not "be in effect" until FSX is restarted (although perhaps something like an edited compound switch assignment might be immediately activated by a subsequent Reload all buttons operation). Thx, Al
  12. Hi Pete, Two questions please: Is there a way to access the FSUIPC tabs, like Key Presses or Buttons+Switches, to make changes without first having to load a flight? When you use the Reload all buttons or Reload all keys features, is the complete FSUIPC.ini file reloaded so any direct edits made 'elsewhere' to the file will be updated as well? Thx, Al
  13. Hello Pete, Offset 0x31C8 is described as vertical acceleration relative to the world axes. Am I correct in understanding that this acceleration is a measure of the time rate of change of an aircraft's vertical velocity, as we normally think of it, relative to the earth's surface? For example, this would be a measure of how an aircraft's vertical velocity is changing with time during landing. And offset 0x3068 is described as vertical acceleration relative to the body axes. I assume the body in this case is the aircraft. So if the aircraft is flying 'level' (meaning not pitched up or down), I assume this acceleration value would be the same as the 0x31C8 value, but would otherwise differ with the pitch of the aircraft since, for example, in a steep climb the vertical axis of the aircraft is no longer vertical relative to the earth's surface. I would also like to ask about how often, on average, would you estimate these values, or offsets in general, get updated? My understanding is values in FSX nominally get updated about 18 times per sec, or about once every 56 milliseconds. Is this a reasonable number for the typical update rate of an offset? Thanks, Al
  14. NpCmoveAircraft is a Lua script in the Numberpad Control family of FSX scripts that can be used to move an aircraft to a new position. Each step includes prompts for the required input and format. User inputs include: The distance to move (NMs) The direction to move (degrees magnetic) The desired altitude (ft) The desired aircraft heading (degrees magnetic) The desired aircraft IAS (Kts) and landing gear position -- up (u), down (d) or fixed (f) Or - For any of the five inputs the user can simply enter a carriage return (Enter key) to signify No Change for that particular entry Prior to the move the aircraft can be on the ground or in the air. So, for example, NpCmoveAircraft can be used to simply turn an a/c around, move it to the other end of a runway, reposition it for another approach after landing, jump ahead in cruise, catch up to another a/c, etc. NpCmoveAircraft works with default FSX aircraft and many add-on aircraft that adhere to the standard FSUIPC offsets. A registered copy of FSUIPC is required to execute the NpCmoveAircraft Lua script. Simply copy the script to the Modules folder of FSX and use FSUIPC to assign a ‘hot key’, button or switch to activate the script. NpCmoveAircraft.zip
  15. Well, a friend running the same Lua scripts does not see the delay problem I described above with the ipc.ask() function, so I still have a bug of some type to hunt down. If I find it I'll report back. Thx, Al
  16. Pete, As you thought, the 'failure to display as expected' issue seems related to timing. I ran the following experiment using the same flight in all cases: If I waited 10 secs after the flight loaded (after the a/c appeared on the runway) to activate the Lua script with the ipc.ask() function, it worked as expected 8 times in a row, restarting FSX each time. If I waited 5 secs after the flight loaded to activate the Lua script with the ipc.ask() function, it failed to display as expected 8 times in a row, restarting FSX each time. By fail I mean nothing was displayed as a result of the script being activated by a keystroke. So somewhere between 5 and 10 seconds seems to be a critical delay time for the script with the ipc.ask() function, at least on my machine. This is probably why my script worked as expected only part of the time. I didn't wait long enough to test it. If I waited a sec or less after the flight loaded, a different Lua script using a single line ipc.writeSTR(0x3380, "string") function worked 8 times in a row, restarting FSX each time. So it seems that on my machine the single line ipc.writeSTR(0x3380, "string") function is not nearly as time sensitive as the ipc.ask() function. Finally, inline with a comment you made in a post above, when I modified the above ipc.writeSTR(0x3380, "string") function to display two lines, the script behavior time-wise was the same as it was for the script with the ipc.ask() function. Al
  17. I turned off Pause after Crash in the Miscellaneous tab, so that should end the name.ipcbin problem. Regarding the original problem, below is a part of a log file that shows the NpCmoveAircraft.lua file was called by the Ctrl+M keystroke and indicates the argument of the ipc.ask() function was displayed -- but in actuality nothing appeared on the screen until after the 3 keystroke input 256 was provided, but did display before a carriage return. I need to figure out why this happens sometimes, but ipc.ask() works as expected other times. Al 30000 444=CR(+Y,10)Y,39,C65854,0 30000 446=RY,3,Cx32000BC0,x3FFF0010 30000 448=RY,2,Cx42000BC0,xC0010010 31578 KEYDOWN: VK=17, Waiting=0, Repeat=N, Shifts=2 31578 .. Key not programmed -- passed on to FS 31969 KEYDOWN: VK=77, Waiting=0, Repeat=N, Shifts=2 31969 .. This key is programmed in FSUIPC4 'Keys' options 31969 LUA.0: beginning "C:\FSX\Modules\NpCmoveAircraft.lua" 31969 LUA.0: C:\FSX\Modules\NpCmoveAircraft.lua:10 31985 LUA.0: Global: ipcPARAM = 0 31985 LUA.0: C:\FSX\Modules\NpCmoveAircraft.lua:13 31985 LUA.0: Global: mag_variation_degs = 8.096923828125 31985 LUA Asks: " Enter Distance to Move A/C in NMs (0-500), or just the ENTER key for 0 NM * to Exit (Longer distances tend to be less accurate due to changing magnetic declination)" 35719 Monitor IPC:024C (S32) = 2454700 39578 Starting everything now ... 40891 Advanced Weather Interface Enabled 55797 Monitor IPC:024C (S32) = 2448472 56141 LUA Reply: "256" 56141 LUA.0: C:\FSX\Modules\NpCmoveAircraft.lua:14 56141 LUA.0: Global: move_distance_nm_str = 256 56141 LUA.0: C:\FSX\Modules\NpCmoveAircraft.lua:17 56141 LUA.0: C:\FSX\Modules\NpCmoveAircraft.lua:18 56141 LUA.0: Global: move_distance_nm = 256 56141 LUA.0: C:\FSX\Modules\NpCmoveAircraft.lua:21 56141 LUA.0: C:\FSX\Modules\NpCmoveAircraft.lua:22 56141 LUA.0: C:\FSX\Modules\NpCmoveAircraft.lua:31
  18. The source of the strange green bar appears to have been flightname.ipcbin files in the Flight Simulator X Files folder. I don't know what type of information these files hold, but deleting it for a given saved flight stopped the strange green bar behavior. I assume the flightname.ipcbin files will get regenerated -- don't know if the problem will then return. As for now, I'm back to working on the original problem. Al
  19. I am really confused: When I open that log file I don't see those lines you show above, and can't find them with notepad ++ search, but obviously you see them. I did not push any keys, just used the mouse to load the flight, exit back to the Free Flight page, and then reload the flight. I have FSX-SE installed but have only been running the boxed FSX, not Steam. I don't have an E drive installed Yet what you show above, the ask message, is from one of my Lua scripts, but the message I get on the green bar is not from that script. The message I see is NAV1 Freq, 5 Digits. And I don't have a Lua script called ask.Lua. I just did a complete search of my machine for a file with that name -- found nothing. I just reran the flight load and reload experiment, got the green bar again, and here is the log file (looks like what the first log file looked like to me): ********* FSUIPC4, Version 4.962 (8th February 2017) by Pete Dowson ********* Windows 10 Pro 64 Bit reported as Build 14393, Release ID: 1607 (OS 10.0) fsx.exe version = 10.0.61472.0 Reading options from "C:\FSX\Modules\FSUIPC4.ini" Running inside FSX on Windows 10 Module base=59AF0000 User Name="Alan Klayton" User Addr="arklayton@comcast.net" FSUIPC4 Key is provided WIDEFS7 not user registered, or expired 0 System time = 14/02/2017 07:23:34 0 FLT path = "C:\Users\Al\Documents\Flight Simulator X Files\" 0 ------ Module Version Check ------ 0 acontain.dll: 10.0.61472.0 0 api.dll: 10.0.61472.0 0 controls.dll: 10.0.61472.0 0 fs-traffic.dll: 10.0.61472.0 0 G3D.dll: 10.0.61472.0 0 language.dll: 10.0.61472.0 0 sim1.dll: 10.0.61472.0 0 visualfx.dll: 10.0.61472.0 0 weather.dll: 10.0.61472.0 0 window.dll: 10.0.61472.0 0 ---------------------------------- 31 Trying to connect to SimConnect Acc/SP2 Oct07 ... 47 FS path = "C:\FSX\" 328 ---------------------- Joystick Device Scan ----------------------- 328 Product= Saitek Pro Flight Rudder Pedals 328 Manufacturer= Saitek 328 Vendor=06A3, Product=0763 (Version 1.1) 328 Serial Number= 328 Product= Saitek Pro Flight Yoke 328 Manufacturer= Saitek 328 Vendor=06A3, Product=0BAC (Version 3.4) 328 Serial Number= 328 Product= BU0836A Interface 328 Manufacturer= Leo Bodnar 328 Vendor=16C0, Product=05BA (Version 1.34) 328 Serial Number= B56696 328 ------------------------------------------------------------------- 703 LogOptions=40000000 00000001 718 ------------------------------------------------------------------- 718 ------ Setting the hooks and direct calls into the simulator ------ 718 --- CONTROLS timer memory location obtained ok 718 --- SIM1 Frictions access gained 718 --- FS Controls Table located ok 718 --- Installed Mouse Macro hooks ok. 718 --- Wind smoothing fix is fully installed 718 --- G3D.DLL fix attempt installed ok 718 --- SimConnect intercept for texts and menus option is off 718 --- All links checked okay 718 ------------------------------------------------------------------- 718 SimConnect_Open succeeded: waiting to check version okay 718 Trying to use SimConnect Acc/SP2 Oct07 718 Opened separate AI Traffic client okay 5562 Running in "Microsoft Flight Simulator X", Version: 10.0.61472.0 (SimConnect: 10.0.61259.0) 5562 Initialising SimConnect data requests now 5562 FSUIPC Menu entry added 5578 c:\users\al\documents\flight simulator x files\Default Flight 35L KCOS L35A.FLT 5578 C:\FSX\SimObjects\Airplanes\Learjet 35A FLYSIMWARE_17SEP16_Mod_11FEB17\Learjet35A.AIR 6375 Monitor IPC:024C (S32) = 3436272 15640 Monitor IPC:024C (S32) = 2753540 25781 Monitor IPC:024C (S32) = 2600904 30578 User Aircraft ID 1 supplied, now being used 31109 System time = 14/02/2017 07:24:05, Simulator time = 07:23:39 (14:23Z) 31500 Aircraft="Learjet 35A/C-21A USAF 01320 AF Academy BG GTN" 31515 [Buttons] now profile-specific: 31515 27=RY,20,C65602,0 31515 30=PY,19,C65859,0 31515 30=PY,19,C65859,0 31515 31=CR(+Y,9)Y,7,C66277,0 31515 31=CR(+Y,9)Y,7,C66277,0 31515 32=CR(+Y,9)Y,6,C66276,0 31515 32=CR(+Y,9)Y,6,C66276,0 31515 38=PY,17,CL40:R,0 31515 39=CP(+Y,8)Y,38,C65906,0 31515 39=CP(+Y,8)Y,38,C65906,0 31515 39=CP(+Y,8)Y,38,C65906,0 31515 39=CP(+Y,8)Y,38,C65906,0 31515 40=CP(+Y,8)Y,34,C65907,0 31515 40=CP(+Y,8)Y,34,C65907,0 31515 40=CP(+Y,8)Y,34,C65907,0 31515 40=CP(+Y,8)Y,34,C65907,0 31515 45=PY,14,CL73:R,0 31515 47=CP(+Y,8)Y,32,C65913,0 31515 47=CP(+Y,8)Y,32,C65913,0 31515 47=CP(+Y,8)Y,32,C65913,0 31515 47=CP(+Y,8)Y,32,C65913,0 31515 402=CP(+Y,8)Y,36,K35,8 31515 402=CP(+Y,8)Y,36,K35,8 31515 402=CP(+Y,8)Y,36,K35,8 31515 402=CP(+Y,8)Y,36,K35,8 31515 432=CR(+Y,10)Y,33,C65856,0 31515 432=CR(+Y,10)Y,33,C65856,0 31515 436=CR(+Y,10)Y,35,C65857,0 31515 436=CR(+Y,10)Y,35,C65857,0 31515 440=CR(+Y,10)Y,37,C65855,0 31515 440=CR(+Y,10)Y,37,C65855,0 31515 444=CR(+Y,10)Y,39,C65854,0 31515 444=CR(+Y,10)Y,39,C65854,0 31515 446=RY,3,Cx32000BC0,x3FFF0010 31515 448=RY,2,Cx42000BC0,xC0010010 31515 [Buttons] now profile-specific: 31515 27=RY,20,C65602,0 31515 27=RY,20,C65602,0 31515 30=PY,19,C65859,0 31515 30=PY,19,C65859,0 31515 31=CR(+Y,9)Y,7,C66277,0 31515 31=CR(+Y,9)Y,7,C66277,0 31515 32=CR(+Y,9)Y,6,C66276,0 31515 32=CR(+Y,9)Y,6,C66276,0 31515 38=PY,17,CL40:R,0 31515 39=CP(+Y,8)Y,38,C65906,0 31515 39=CP(+Y,8)Y,38,C65906,0 31515 39=CP(+Y,8)Y,38,C65906,0 31515 39=CP(+Y,8)Y,38,C65906,0 31515 40=CP(+Y,8)Y,34,C65907,0 31515 40=CP(+Y,8)Y,34,C65907,0 31515 40=CP(+Y,8)Y,34,C65907,0 31515 40=CP(+Y,8)Y,34,C65907,0 31515 45=PY,14,CL73:R,0 31515 47=CP(+Y,8)Y,32,C65913,0 31515 47=CP(+Y,8)Y,32,C65913,0 31515 47=CP(+Y,8)Y,32,C65913,0 31515 47=CP(+Y,8)Y,32,C65913,0 31515 402=CP(+Y,8)Y,36,K35,8 31515 402=CP(+Y,8)Y,36,K35,8 31515 402=CP(+Y,8)Y,36,K35,8 31515 402=CP(+Y,8)Y,36,K35,8 31515 432=CR(+Y,10)Y,33,C65856,0 31515 432=CR(+Y,10)Y,33,C65856,0 31515 436=CR(+Y,10)Y,35,C65857,0 31515 436=CR(+Y,10)Y,35,C65857,0 31515 440=CR(+Y,10)Y,37,C65855,0 31515 440=CR(+Y,10)Y,37,C65855,0 31515 444=CR(+Y,10)Y,39,C65854,0 31515 444=CR(+Y,10)Y,39,C65854,0 31515 446=RY,3,Cx32000BC0,x3FFF0010 31515 448=RY,2,Cx42000BC0,xC0010010 35672 Monitor IPC:024C (S32) = 2463548 45765 Monitor IPC:024C (S32) = 2466636 50562 Weather Mode now = Real World 50562 C:\Users\Al\AppData\Roaming\Microsoft\FSX\Previous flight.FLT 55703 Monitor IPC:024C (S32) = 2349496 65734 Monitor IPC:024C (S32) = 2374840 67281 Starting everything now ... 68468 Advanced Weather Interface Enabled 75890 Monitor IPC:024C (S32) = 2377932 85765 Monitor IPC:024C (S32) = 2362056 98375 System time = 14/02/2017 07:25:12, Simulator time = 07:23:39 (14:23Z) 98375 *** FSUIPC log file being closed Minimum frame rate was 30.1 fps, Maximum was 30.9 fps Minimum available memory recorded was 32768Mb Average frame rate for running time of 26 secs = 30.1 fps G3D fix: Passes 12454, Null pointers 0, Bad pointers 0, Separate instances 0 Maximum AI traffic for session was 2 aircraft Memory managed: 20 Allocs, 20 Freed ********* FSUIPC Log file closed ***********
  20. Attached is the log file. I loaded a flight, then returned to the Free Flight page, then reloaded the flight and upon reload got the strange green bar as described above. Al FSUIPC4.log
  21. I created a temporary folder in the FSX modules folder and moved all my Lua scripts into this temporary folder to hide them from FSUIPC. I also renamed my FSX.cfg file so FSX would have to build a new one. I then rebooted the computer an restarted FSX. After all that, I still got the same strange green bar, with a message which is definitely from one of my own scripts, when I loaded and then reloaded a file as described above. Amazing! The only other text displayed was Shift+Z info, the Cockpit View Zoom setting, and the Parking Brakes set message. Al
  22. I get the same results with the Test2 dll as I did with Test1 dll. I have noticed another strange thing. If I start FSX and load a flight, and then hit the ESC key and return to the Free Flight page of FSX, and then click on Fly Now to reload the same flight, when the flight reloads I immediately get a 3380/32FA type green bar one line display on the screen that is related to a Lua script that I have been using for years. And the display remains on the screen instead of closing after a few seconds as it normally would. This happens even though I did not run any Lua scripts since FSX was started, and this also happens when I start with different initial flights as well , but not with all initial flights. And if after returning to the Free Flight page as described above I reload a different flight then what was initially loaded, then the strange green bar display may or may not appear. And if it does display it is not always the same. I thought maybe some type of corrupt display information was getting saved with a stored flight, but didn't see anything in the .FLT file. This probably makes sense since this strange display is not seen on the initial flight load, but rather on the reload of the flight. I was also wondering if FSUIPC saves information on scripts that have been run in a cache, or maintains a keystroke buffer, and perhaps something in the cache or buffer has become corrupt? I can't understand what is triggering the strange green bar display when no Lua scripts have been run since a restart of FSX. Despite two attempts, I wasn't able to roll back the latest Win10 update. For some reason the Restore operation couldn't find a file it wanted to restore. . Al
  23. Unfortunately, the test FSUIPC.dll did not help. I see that I had a Win10 update on 8 Feb. I'm not sure if this problem existed before that time or not, but I will do a Restore to roll back that update to see if it makes a difference and will let you know. I sincerely appreciate your efforts on my behalf. Al
  24. Yes, once an ipc.ask() script starts working, all scripts using it work until FSX is restarted. Once in a while, the scripts do work right away after an FSX restart, but this does not happen very often. My point, a poor one perhaps, was that holding the script activation key down, and thus making repeated calls to the script, did not help. I have used scripts with ipc.ask() quite a bit in the past without any problem, and I can't put my finger on what has changed in the last week or so. Very odd. Thanks very much for the time you have spent on this. Maybe the problem will go away with the next forced Win10 update -- one can always hope! Al
  25. With both FSUIPC 4.959 and 4.962: Displaying multiple lines with ipc.writeSTR(0x3380, "string") with rare exception, required two or three calls to the script (key inputs). If, however, I first called a script with a single display line via ipc.writeSTR(0x3380, "string"), then the multiple line ipc.writeSTR(0x3380, "string") display worked with the first call (key input). My comment about seeing the problem with different scripts, restarting FSX each time, was just to say the problem did not seem related to a particular script. I will be glad to try any experiment that may help track down the problem. I don't have the No Repeats! turned on under the Keys Presses tab, but holding down a key still didn't help. Thx, Al .
×
×
  • 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.