Jump to content
The simFlight Network Forums

Genew

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Genew

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    PA
  1. Hi Pete, thank you for responding to this issue. I have all of my FSUIPC assignments as direct, as I read that is more efficient, & it makes perfect sense to me. I was trying to assign the slider to the carb heat function, but that is not an option in the direct assignments. So the answer is it was not assigned. I never thought to try to assign to FSX option as I did not see why that would make any difference. Roman's suggestion to look for the "Lua value" option caused me to poke around for it, which I found in "send to FS as normal value". Then 3 or 4 lines of Lua code completely solved the problem. Since I needed to send to an Lvar for my A2A PA28 this was the way to do it. I have been using FSUIPC for about 8 years now for my sim, and I just learned something new. And useful! Thank you! Gene
  2. Thank you, Roman. That is the help I needed. I spent the last couple days re-reading the manuals, I did not realize that the "send to FS as normal axis" had all those options, I have my normal axes all set as direct. I am aware of the event facilities, I previously wrote a couple Lua programs that control the radio buttons with my Go Flight hardware. They work just fine. Gene
  3. I have a question regarding a slider axis control. I am running FSX in Windows 7, and I have a registered FSUIPC 4.974b. I also have Lua 5.1. My sim yoke is a PFC Cirrus, relatively new, operates direct with no included software drivers. This yoke has a “throttle” slider that I wish to repurpose for carb heat for my A2A PA28. In the Axis Assignment in FSUIPC the slider control shows up as “Joy 0” lever “S” and shows changing values as I move the slider. On page 41 of the FSUIPC manual “S” is listed as a valid axis identification. On page 1 of the Lua library reference under ipc.axis, the “S” is not listed as an acceptable assignment. Enclosed here is my test Lua script, and the resulting log file. This proves that ipc.axis does indeed read values on the “X” axis of the yoke, but not the “S” values as I move the “throttle” lever. For testing purposes I forced the Lvar and that works. Am I missing something here? -- Carb test pogram for A2A PA28 3-6-19 -- clear down the display ipc.setowndisplay("Lua test",3,3,10,30) -- My screen is 3 screen wide ipc.lineDisplay("", 0) val = 0 for loopaxis = 1,5 do n=ipc.axis(0,"S") --Slider axis showit = string.format("Slider read: %d", n) ipc.lineDisplay(showit) ipc.log(showit) X=ipc.axis(0,"X") --Yoke X axis showit = string.format("Aileron read: %d", X) ipc.lineDisplay(showit) ipc.log(showit) ipc.writeLvar("Eng1_CarbHeatSwitch",val) val = val+30 ans = ipc.ask("Press q to exit") if ans == "q" then ipc.exit() end end ********* LUA: "CarbTest" Log [from FSUIPC version 4.974b] ********* 60076 System time = 06/03/2019 11:55:11, Simulator time = 12:46:22 (16:46Z) 60076 LUA: beginning "D:\FSX\Modules\CarbTest.lua" 60107 LUA: Slider read: 16191 60138 LUA: Aileron read: -680 60154 LUA Asks: "Press q to exit" 177373 LUA Reply: "" 177373 LUA: Slider read: 16191 177389 LUA: Aileron read: -1417 177420 LUA Asks: "Press q to exit" 181616 LUA Reply: "" Thanks for any help you can provide. Gene FSUIPC4.JoyScan.csv
  4. I re-tested after changing ipcinit.lua to ipcready.lua and all my controls came back. i should have made that test before posting. Still some instrument issues but better.
  5. Pete, I have been working with Simplugins with respect to this problem. Reinhard fixed the error that appeared in the ipcinit.log file, but the result caused another problem that he cannot duplicate and I do not understand. To avoid any possible contamination from my lua scripts, I removed them totally from the \modules directory. The new problem is that my flight controls (yoke, rudder, throttle quadrant) are disconnected from the plane. FSUIPC sees them as normal in the Axis assignment screens, but nothing happens on the plane. No errors appear in the ipcinit.log or the FSUIPC.log. If you wish to look at the detail version of how I did my testing you can look here http://www.avsim.com/topic/505032-a2a-add-on-lua-error-with-fsuipc-4962/ With ipcinit.lua removed the flight controls work as they should. With ipcinit.lua present, FSUIPC sees the flight controls but they don't do anything on the plane. I tried "send direct" and "send to FS as normal", no difference. Could this be some sort of memory issue?
  6. Pete, I made the test of changing ipcinit.lua to ipcready.lua. As you suspected, all the guages worked and the ipcready.log had no lua error. So now off to contact the supplier of Simplugins to get a permanent fix. Thanks for your help. Gene
  7. Hi Dan, I had the same problem with 'HOBHR4' nil value. I posted today & Pete replied. Please check my post "Upgrade from 4.949f to 4.962 & simconnect". The fault is in the A2A simplugins add-on. I am going to pursue this with Simplugins. Let me know if you have any question that I might help with. Pete remembered the 'HOBHR4' connection, I did a search & came up with this thread. I saw your thread initially but did not read far enough! Gene
  8. Pete, thank you very much for a prompt & informative reply. I've written some Lua code to get my controls to work with the A2A planes, so I understand "nil". I just didn't understand why it might have worked for so long & not now. I will try your last suggestion & let you know if I find anything interesting. And I will get in touch with the supplier. Gene
  9. I had recently made a hardware change in my simpit & decided to check my add-on software versions. I upgraded my FSUIPC4 from 4.949f to 4.962. This resulted in a partial failure in instruments on 2 of my planes. Here is my configuration: running FSX on Windows 7 with 3 screens and TripleHead2GO. A 4th monitor runs instruments on a small computer using SimPlugins software and Simconnect. The airplanes using the instruments on the 4th monitor are the A2A Cessna 172 and A2A PA28. These planes have been running fine for a couple of years. When I upgraded FSUIPC to 4.962, I found the RPM guage and a few other gauges failed to register. To prove the problem I restored to 4.949f and all gauges worked correctly. I reinstalled 4.962 and the failure returned. IMPORTANT: The problem is in the Simplugins gauges running through Simconnect on the 2nd computer. All the planes gauges running on the main computer are not affected. I have no access to the code in Simplugins. I made no changes to Simplugins or the A2A code or any other code. My question is what change in FSUIPC could cause the ‘HOBHR4’ variable to have no value? This variable would be the meter part of the RPM guage, and when lua fails any subsequent code would not run. Is it a memory problem with simconnect? Any suggestion how to figure this out would be appreciated. I can contact Simplugins but would like to give them a clue as to what the issue is. Logs follow. Looking at the ipcinit log points to the problem in the Simplugins software. (I added the red color) ********* LUA: "ipcInit" Log [from FSUIPC version 4.949f] ******** 9735 System time = 17/02/2017 15:23:29 9735 LUA: beginning "D:\FSX\Modules\ipcInit.lua" 370316 System time = 17/02/2017 15:29:30, Simulator time = 11:16:13 (15:16Z) ********* LUA execution terminated: Log Closed ********* ********* LUA: "ipcInit" Log [from FSUIPC version 4.962] ********* 2527 System time = 17/02/2017 15:42:12 2527 LUA: beginning "D:\FSX\Modules\ipcInit.lua" 2527 *** LUA Error: ipcinit_SOURCE.lua:36: attempt to perform arithmetic on global 'HOBHR4' (a nil value) 2527 >>> Thread forced exit <<< 2527 System time = 17/02/2017 15:42:12 ********* LUA execution terminated: Log Closed ********* ********* LUA: "ipcInit" Log [from FSUIPC version 4.962] ********* 8596 System time = 18/02/2017 08:56:01 8596 LUA: beginning "D:\FSX\Modules\ipcInit.lua" 8596 *** LUA Error: ipcinit_SOURCE.lua:36: attempt to perform arithmetic on global 'HOBHR4' (a nil value) 8596 >>> Thread forced exit <<< 8596 System time = 18/02/2017 08:56:01 ********* LUA execution terminated: Log Closed ********* FSUIPC4 INSTALLATION LOG & RUN LOG FOLLOW -- Installer for FSUIPC4.DLL version 4.962 Looking in registry for FSX install path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator\10.0 Parameter"SetupPath" ... >>> OK! FOUND FSX! <<< ... SetupPath=D:\FSX\ Looking in registry for FSX-SE install path: HKEY_LOCAL_MACHINE\SOFTWARE\DovetailGames\FSX Parameter"Install_Path" Not there, so looking in: HKEY_CURRENT_USER\SOFTWARE\DovetailGames\FSX Parameter"AppPath" Not there, so looking in: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator - Steam Edition\10.0 Parameter"SetupPath" Not there, so looking in: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator - Steam Edition\10.0 Parameter"AppPath" ... NOT found! ... Looking in registry for Prepar3D v1 install path: HKEY_LOCAL_MACHINE\SOFTWARE\LockheedMartin\Prepar3D Parameter"SetupPath" Not there, so looking in: HKEY_CURRENT_USER\SOFTWARE\LockheedMartin\Prepar3D Parameter"AppPath" ... NOT found! ... Looking in registry for Prepar3D v2 install path: HKEY_LOCAL_MACHINE\SOFTWARE\Lockheed Martin\Prepar3D v2 Parameter"SetupPath" Not there, so looking in: HKEY_CURRENT_USER\SOFTWARE\Lockheed Martin\Prepar3D v2 Parameter"AppPath" ... NOT found! ... Looking in registry for Prepar3D v3 install path: HKEY_LOCAL_MACHINE\SOFTWARE\Lockheed Martin\Prepar3D v3 Parameter"SetupPath" Not there, so looking in: HKEY_CURRENT_USER\SOFTWARE\Lockheed Martin\Prepar3D v3 Parameter"AppPath" ... NOT found! ... =========================================================== INSTALLATION FOR FSX: SetupPath="D:\FSX\" Checking version of the FSX EXE: ... Version 10.0.61637.0 (Need at least 10.0.60905.0) Checking compatibility with installed SimConnect: Found SimConnect build 60905 (Original) Found SimConnect build 61242 (SP1 May07) Found SimConnect build 61259 (Acc/SP2 Oct07) Checking if there's already a version of FSUIPC4 installed in: D:\FSX\Modules\FSUIPC4.DLL ... Version 4.949f found. FSX Modules folder already exists. Okay -- installed FSUIPC4 into "D:\FSX\Modules\FSUIPC4.DLL" Looking for the current user's Application Data path: ... found as "C:\Users\Gene\AppData\Roaming" Now finding \Microsoft\FSX\FSX.CFG for all users, including this one Looking in "C:\Users\All Users\AppData\Roaming" ... No FSX.CFG there Looking in "C:\Users\Default\AppData\Roaming" ... No FSX.CFG there Looking in "C:\Users\Default User\AppData\Roaming" ... No FSX.CFG there Looking in "C:\Users\Gene\AppData\Roaming" Found FSX.CFG in "C:\Users\Gene\AppData\Roaming\Microsoft\FSX\FSX.CFG" Now checking DLL.XML ... ... There is a previous DLL.XML, checking for FSUIPC4 section. ... FSUIPC4 section already exists but will be replaced. (for FSUIPC4, without Loader) ... FSUIPC4 section of DLL.XML written okay Now checking for a SimConnect.XML file ... ... There is a SimConnect.XML, checking for "local" section. ... "local" section already exists, file not modified. Looking in "C:\Users\Public\AppData\Roaming" ... No FSX.CFG there "Modules\FSUIPC Documents" folder already exists. Now installing additional files into the "Modules\FSUIPC Documents" folder: Installed "FSUIPC4 User Guide.pdf" okay Installed "FSUIPC4 for Advanced Users.pdf" okay Installed "FSUIPC4 History.pdf" okay Installed "The 2016 List of FSX and P3D Controls.pdf" okay Installed "FSUIPC Lua Library.pdf" okay Installed "FSUIPC Lua Plug-Ins.pdf" okay Installed "Lua License.pdf" okay Installed "Lua Plugins for VRInsight Devices.pdf" okay Installed "LuaFileSystem.pdf" okay Installed "Example LUA plugins.zip" okay Installed "ASN WX Radar facilities in FSUIPC4.pdf" okay Installed "Offset Mapping for PMDG 737NGX.pdf" okay Installed "Offset Mapping for PMDG 777X.pdf" okay Installed "FSUIPC4 Offsets Status.pdf" okay Installed "Profiles in Separate Files.pdf" okay Installed "FSUIPC4_Loader.dll" okay =========================================================== All installer tasks completed. Registration dialog exit: selected BOTH CHECK Checking FSUIPC registration ... Checking WIDEFS registration ... Registration check for FSUIPC4 and WideFS was successful! (result code 00) *************** End of Install Log *************** FSUIPC4 RUN LOG -- ********* FSUIPC4, Version 4.962 (8th February 2017) by Pete Dowson ********* Windows 7 Professional 64 Bit with SP 1.0 reported as Build 7601 (OS 6.1) fsx.exe version = 10.0.61637.0 Reading options from "D:\FSX\Modules\FSUIPC4.ini" Running inside FSX on Windows 7 Module base=5F1F0000 User Name="Eugene Witherup" User Addr="mandgenew@gmail.com" FSUIPC4 Key is provided WideFS7 Key is provided 31 System time = 18/02/2017 08:55:53 62 FLT UNC path = "\\FLIGHTSIM1\Gene\Documents\Flight Simulator X Files\" 62 ------ Module Version Check ------ 62 acontain.dll: 10.0.61637.0 62 api.dll: 10.0.61637.0 62 controls.dll: 10.0.61637.0 62 fs-traffic.dll: 10.0.61637.0 62 G3D.dll: 10.0.61637.0 62 language.dll: 10.0.61637.0 62 sim1.dll: 10.0.61637.0 62 visualfx.dll: 10.0.61637.0 62 weather.dll: 10.0.61637.0 62 window.dll: 10.0.61637.0 62 ---------------------------------- 608 Trying to connect to SimConnect Acc/SP2 Oct07 ... 624 FS UNC path = "\\FLIGHTSIM1\FSX\" 952 ---------------------- Joystick Device Scan ----------------------- 952 Product= PFC Cirrus Yoke 952 Manufacturer= Precision Flight Controls, Inc. 952 Vendor=0689, Product=D014 (Version 2.0) 952 Serial Number= 952 Product= Saitek Pro Flight Rudder Pedals 952 Manufacturer= Saitek 952 Vendor=06A3, Product=0763 (Version 1.0) 952 Serial Number= 952 Product= Pro Flight Cessna Trim Wheel 952 Manufacturer= Saitek 952 Vendor=06A3, Product=0BD4 (Version 1.7) 967 Serial Number= RD016638 967 Product= Saitek Pro Flight Quadrant 967 Manufacturer= Saitek 967 Vendor=06A3, Product=0C2D (Version 2.2) 967 Serial Number= 967 Product= Saitek Pro Flight Quadrant 967 Manufacturer= Saitek 967 Vendor=06A3, Product=0C2D (Version 2.0) 967 Serial Number= 967 ------------------------------------------------------------------- 1014 Run: "D:\FSX\Modules\GFDevFSX.exe" 1201 LogOptions=80000000 00000001 1201 ------------------------------------------------------------------- 1201 ------ Setting the hooks and direct calls into the simulator ------ 1201 --- CONTROLS timer memory location obtained ok 1217 --- SIM1 Frictions access gained 1217 --- FS Controls Table located ok 1217 --- Installed Mouse Macro hooks ok. 1217 --- Wind smoothing fix is fully installed 1217 --- G3D.DLL fix attempt installed ok 1217 --- SimConnect intercept for texts and menus option is off 1217 --- All links checked okay 1217 ------------------------------------------------------------------- 1217 SimConnect_Open succeeded: waiting to check version okay 1217 Trying to use SimConnect Acc/SP2 Oct07 1217 Opened separate AI Traffic client okay 8580 Running in "Microsoft Flight Simulator X", Version: 10.0.61637.0 (SimConnect: 10.0.61259.0) 8580 Initialising SimConnect data requests now 8580 FSUIPC Menu entry added 8642 \\FLIGHTSIM1\Gene\documents\flight simulator x files\default Skyhawk KSEA.FLT 8642 \\FLIGHTSIM1\FSX\SimObjects\Airplanes\C172\Cessna172SP.AIR 65146 \\FLIGHTSIM1\FSX\SimObjects\Airplanes\A2A_Piper_PA28_180_Cherokee\PA28_180.AIR 65146 Weather Mode now = Theme 65146 \\FLIGHTSIM1\Gene\documents\flight simulator x files\A2A Cherokee at N13.FLT 66722 User Aircraft ID 1 supplied, now being used 150713 System time = 18/02/2017 08:58:23, Simulator time = 11:16:13 (15:16Z) 150728 Aircraft="Piper Pa-28-180 Cherokee" 169152 Starting everything now ... 169167 Using "D:\FSX\Modules\GFDEV.DLL", version 1.0.0.1 169167 GoFlight GFT8 detected: 2 devices 169167 GoFlight GFMCP detected: 1 device 169167 GoFlight GFRP48 detected: 1 device 169167 GoFlight GFATC detected: 1 device 169167 GoFlight GFLGT2 detected: 1 device 169199 Plug-in thread table check: 169199 0: Okay: "D:\FSX\Modules\A2A PA28-180.lua" 169199 Plug-in thread table check: 169199 0: Okay: "D:\FSX\Modules\A2A PA28-180.lua" 169199 Plug-in thread table check: 169199 0: Okay: "D:\FSX\Modules\A2A PA28-180.lua" 170478 Advanced Weather Interface Enabled 178574 **** No SimConnect events or states being received! Re-connecting now ... **** 178683 SimConnect_Open succeeded: waiting to check version okay 178683 Opened separate AI Traffic client okay 178683 Running in "Microsoft Flight Simulator X", Version: 10.0.61637.0 (SimConnect: 10.0.61259.0) 178683 Initialising SimConnect data requests now 178683 FSUIPC Menu entry added 178683 User Aircraft ID 1 supplied, now being used 178746 \\FLIGHTSIM1\Gene\AppData\Roaming\Microsoft\FSX\Previous flight.FLT 179042 System time = 18/02/2017 08:58:52, Simulator time = 11:16:27 (15:16Z) 1183814 Sim stopped: average frame rate for last 1005 secs = 45.7 fps 1183814 Max AI traffic was 0 aircraft 1218040 System time = 18/02/2017 09:16:11, Simulator time = 11:16:13 (15:16Z) 1218040 *** FSUIPC log file being closed Minimum frame rate was 36.2 fps, Maximum was 46.0 fps Minimum available memory recorded was 1876Mb Average frame rate for running time of 1023 secs = 45.5 fps G3D fix: Passes 12146, Null pointers 0, Bad pointers 0, Separate instances 0 Maximum AI traffic for session was 0 aircraft Memory managed: 456 Allocs, 456 Freed ********* FSUIPC Log file closed ***********
  10. Thanks, Pete. Certainly makes programming & debugging easier. I just wanted to get other opinions on any downside. Gene
  11. When I purchased 2 of the A2A GA aircraft, I had to write Lua programs to get my GoFlight RP48 buttons to work the audio panels of those aircraft. Now I have 3 separate programs, 1 for each A2A GA plane, and 1 for all of the FSX default planes. The meat of the code is different, some code is common. Each program is about 300 lines of code. My question (for those in the know) is there any performance penalty or benefit of the approach to coding one way or another of these alternatives: Separate Lua program for each plane, loaded by the FSUIPC profile for that plane A single Lua program with the Lua program determining which function to call based on which plane is active A common Lua program which loads another Lua program based on which plane is active. (This is unlikely to be any different than #2 because the common code is so small as to be trivial). So which approach should I use for best runtime performance, or does it matter? I'm using FSX and FSUIPC4.949f on Windows 10 Gene
  12. Genew

    PFC Flight controls

    I recently replaced my basic yoke with a PFC Cirrus yoke, which are all USB now. I am running FSX with Windows 7. There is no driver needed. Windows recognizes the PFC yoke as an HID device. Just plug it in,and it can be tested in Windows. Then go to FSUIPC4 and check the axis assignment and calibration. I had absolutely no trouble. Gene
  13. Thanks for the help, guys. I got the latest "Programming in Lua" book a couple weeks ago, & I am working my way through it. Gene
  14. Pete, Thank you for the prompt reply. I do understand that FSUIPC and lua scripts have to be in the modules folder to run with FS. What I did not understand is that FS has to be running in order to write a lua program. However I see the logic of it and understand now. I guess my background of writing software in an editor, syntax checking, basic logic, etc, then plugging the result into another system for test had me headed down the wrong track. I had done a search in this forum for “lua” and found 85 threads. I will now go back through them & see if I can learn anything else. “Clibs” is a folder created by the Lua install package, & contains other libraries. Gene
  15. I am hoping to get some guidance in writing & testing lua programs with FSUIPC. I am a retired programmer, built a GA cockpit 4 years ago. Environment is Win 7, FSX, FSUIPC4 ver 4.937 (registered), Lua 5.1, SciTE editor. I have read the FSUIPC documents re Lua several times, but cannot figure out what I am missing. I tested a couple lua scripts (gfdDisplay & display vals) with FSX & they ran fine, produced expected results. I am a beginner with respect to Lua, my question is where are the 10 lua libraries that come with FSUIPC4? Are they part of FSUIPC4.DLL? For writing a lua program, should this module be copied to lua\clib? Then to test a lua module, I presume it has to be run with FSX. When trying to run a lua script by itself, I get the error "attempt to index global 'ipc' (a nil value)". I would appreciate some comment, am I on the right track or really missing something? I decided to try the Lua route because some of my GoFlight modules do not work with the A2A 172. Thanks for any help. Gene
×

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.