Jump to content
The simFlight Network Forums

aua668

Members
  • Posts

    381
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by aua668

  1. Hi, A question for Pete and John: Is it by intention, that the registration of an event immediately fires the related function, although the event didn't occur? I made a small sample module for easy testing. I just monitored the COM1 offset for changes and traced the firing of the related function. In my function I also tracked, if the function is called the first time or if it has already be run. Here is the simple module: -- Test event.offset function with COM1 offset ipc.log("---------------------------------") local vFirstRun = 0 ipc.log("vFirstRun = 0") function LogCOM1(offset, value) -- react on FSX Input ipc.log("Start LogCOM1") if vFirstRun == 1 then ipc.log( string.format( "1%02X.%02X", math.floor( ipc.readUW(0x034E)/256 ) , ipc.readUW(0x034E) % 256 ) ) else -- first run due to event registration done - now code can be activated vFirstRun = 1 ipc.log("vFirstRun = 1") end ipc.log("Leave LogCOM1") end -- track every change of the COM1 offset ipc.log("Define event") event.offset( 0x034E, "UW", "LogCOM1" ) ipc.log("Event defined") That's what i find in the log: ********* FSUIPC6, Version 6.1.4 (28th July 2021) by Pete & John Dowson ********* Prepar3D.exe version = 5.2.22.27615 Running inside Prepar3D v5 Module base=7FFE660E0000 Windows 10 Home 64 Bit reported as Build 19043, Release ID: 2009 (OS 10.0) Reading options from "C:\Users\Reinhard\Documents\Prepar3D v5 Add-ons\FSUIPC6\FSUIPC6.ini" Checking the Registrations now ... User Name="xxx" User Addr="xxx" FSUIPC6 Key is provided WideFS7 Key is provided 0 System time = 28/08/2021 18:34:39 0 FLT UNC path = "\\PC-P3D\P3D_Files\" 0 NOTE: configuring for no weather reads or writes! 0 Using DialogMode 16 FS UNC path = "\\PC-P3D\P3Dv5\" 79 Finished: 0 Profile files created 79 ---------------------- Joystick Device Scan ----------------------- 94 Product= JoyWarrior A8-8 94 Manufacturer= Code Mercenaries 94 Vendor=07C0, Product=1104 (Version 16.48) 110 GUIDs returned for product: VID_07C0&PID_1104: 110 GUID= {BABB2690-FB55-11E9-8001-444553540000} 110 Details: Btns=8, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X241,Y127,Z127 110 Product= TQ6 125 Manufacturer= GoFlight 125 Serial Number= 00080 7 125 Vendor=09F3, Product=0200 (Version 2.0) 125 GUIDs returned for product: VID_09F3&PID_0200: 125 GUID= {CE023EC0-9A8D-11E8-800E-444553540000} 125 Details: Btns=4, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R221,U216,V221,X220,Y221,Z214 125 Product= Saitek Pro Flight Yoke 125 Manufacturer= Saitek 125 Vendor=06A3, Product=0BAC (Version 3.2) 125 GUIDs returned for product: VID_06A3&PID_0BAC: 125 GUID= {CDFBFD30-9A8D-11E8-800C-444553540000} 125 Details: Btns=23, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U255,V255,X1023,Y1023,Z255 125 Product= Saitek Pro Flight Rudder Pedals 125 Manufacturer= Saitek 125 Vendor=06A3, Product=0763 (Version 1.0) 125 GUIDs returned for product: VID_06A3&PID_0763: 125 GUID= {CDFBFD30-9A8D-11E8-800B-444553540000} 125 Details: Btns=0, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R511,U0,V0,X127,Y127,Z0 125 ------------------------------------------------------------------- 125 Device acquired for use: 125 Joystick ID = 3 (Registry okay) 125 3=JoyWarrior A8-8 125 3.GUID={BABB2690-FB55-11E9-8001-444553540000} 125 Device acquired for use: 125 Joystick ID = 2 (Registry okay) 125 2=TQ6 125 2.GUID={CE023EC0-9A8D-11E8-800E-444553540000} 125 Device acquired for use: 125 Joystick ID = 0 (Registry okay) 125 0=Flight Yoke System 125 0.GUID={CDFBFD30-9A8D-11E8-800C-444553540000} 125 Device acquired for use: 125 Joystick ID = 1 (Registry okay) 125 1=Saitek Pro Flight Rudder Pedals (USB) 125 1.GUID={CDFBFD30-9A8D-11E8-800B-444553540000} 125 ------------------------------------------------------------------- 438 Controllers are set to ON, using RawInput within P3D 438 LogOptions=00000000 00000001 438 ------------------------------------------------------------------- 438 SimConnect_Open succeeded: waiting to check version okay 438 Opened separate AI Traffic client okay 8891 Running in "Lockheed Martin® Prepar3D® v5", Version: 5.2.22.27615 (SimConnect: 5.2.0.0) 8891 Initialising SimConnect data requests now 8891 FSUIPC Menu entry added 8907 ... Using Prepar3D with Professional License 8922 \\PC-P3D\P3D_Files\P3D.fxml 8922 \\PC-P3D\P3D_SimObj\Airplanes\mjc8q400\MJC8Q4.air 9219 ### The user object is 'MJC8Q400_AUA_OE-LGM' 9219 ### Mode: FREEZE_ATT on FREEZE_ALT on FREEZE_LATLON on 14563 Monitor IPC:311E (U16) = 0 14579 ### Mode: PAUSE on 116422 Loading Complete ... 116438 ### Mode: PAUSE off 116922 User Aircraft ID 1 supplied, now being used 116922 Aircraft loaded: running normally now ... 116969 Monitor IPC:311E (U16) = 5664 116969 SimRead: 311E="NAV STANDBY FREQUENCY:1" INT32: 5664 (0x00001620) 117000 Exception 3 "UNRECOGNIZED_ID", Ref 2898, Index param 1 on write SetData for "RECIP ENG FUEL FLOW:1" 117000 Exception 3 "UNRECOGNIZED_ID", Ref 2899, Index param 1 on write SetData for "RECIP ENG FUEL FLOW:2" 117000 Exception 3 "UNRECOGNIZED_ID", Ref 2900, Index param 1 on write SetData for "RECIP ENG FUEL FLOW:3" 117532 System time = 28/08/2021 18:36:37, Simulator time = 10:00:02 (08:00Z) 117766 Aircraft="MJC8Q400_AUA_OE-LGM" 123547 -------------------- Starting everything now ---------------------- 123547 Starting WideServer now ... 123563 Using "C:\Program Files (x86)\GoFlight\GFDEV64.DLL", version 2.2.8.0 123563 GoFlight GFT8 detected: 1 device 123563 GoFlight GF166 detected: 5 devices 123563 GoFlight GFRP48 detected: 2 devices 123563 GoFlight GF46 detected: 1 device 123563 GoFlight GFTQ6 detected: 1 device 123563 GoFlight GFLGT2 detected: 1 device 123563 GoFlight GFMCPPRO detected: 1 device 123563 GoFlight GFEFIS detected: 2 devices 123563 GoFlight GFWP6 detected: 2 devices 123625 Run: ""C:\Users\Reinhard\AppData\Local\vPilot\vPilot.exe" "-host"" 123625 Affinity Mask set to 20 [x14], "vPilot.exe" 123625 ASN active function link set 123625 Ready for ActiveSky WX radar with additional data : : Here comes the debug log with logging on for offset 0x034E (=COM1) : 8030250 LUA.74: --------------------------------- 8030250 LUA.74: vFirstRun = 0 8030250 LUA.74: Define event 8030266 LUA.74: Event defined 8030266 LUA.74: Start LogCOM1 8030266 LUA.74: vFirstRun = 1 8030266 LUA.74: Leave LogCOM1 8035625 Monitor IPC:034E (U16) = 13376 8035625 SimRead: 034E="COM ACTIVE FREQUENCY:1" INT32: 13376 (0x00003440) 8035625 LUA.74: Start LogCOM1 8035625 LUA.74: 134.40 8035641 LUA.74: Leave LogCOM1 So as you can see, the function is fired immediately, when I register the offset, although frequencydid not change. I would have expected, that it fires, if the frequency changes for the first time. Later I switched frequencies and then it fires the second time and by that logs the frequency. As a consequence I would have now to add similar code to all my event functions, to avoid firing during the event registration process. Maybe you can check, if this behaviour is by intention. I had already in the past the feeling, that this happens, but did not consequently trace it down. As I currently have massive problems, where events are not registered although they are defined in the same way since many years, I try to nail my problem down. During these investigations (see thread: https://forum.simflight.com/topic/92801-p3d-52-lua-event-handling-not-reliable/ ) I came across this issue. If this is always working for all type of events in that way, I can add code to my modules, to avoid this firing. But before doing this, I want to be sure, if this behaviour is planned. Thanks in advance. Reinhard
  2. Hi, If links for downloading are not working, you can try to: Left-click on the link and copy the Link-URL Open a new tab in the browser and past the copied link in the address field With that method you are able to download the files. Rgds Reinhard
  3. Hi, One observation from my setup: I tried once to combine my dedicated modules in a single LUA file. If they use a lot of event triggers (radio knobs with GoFlight hardware typically produce 8 different button actions) the performance was worse compared to the single LUA modules. Therefore I stayed with smaller modules with fewer event.button triggers. Rgds Reinhard
  4. Hi, That's how I run my programs without any problems: [Programs] RunIf1=AM=2,READY,CLOSE,"C:\Users\Reinhard\AppData\Local\vPilot\vPilot.exe -host" RunIf2=AM=2,READY,DELAY,"C:\AviaServer\AviaServer.exe" I enclose my command including parameters completely by quotes. Rgds Reinhard
  5. Hi, Have you already tried to run it with quotes arround the command? Run2=READY,CLOSE,"C:\Users\NAME\AppData\Local\FS-Keypad\FS-Keypad.exe C:\Users\NAME\AppData\Local\FS-Keypad\Keypads\303df744-c367-4681-a409-4ac2f187b39e.json" Error 267 = directory name invalid (I assume) Rgds Reinhard
  6. John, Yes these modules are running (partially). I have for example a LUA module for handling NAV1 on a GF module. Most of the events are handled correctly (inc/dec frequency for example) and few events in that module are not reacting (e.g. swapping frequencies). And the real strange thing is, that if I check via the FSUIPC UI on the button page, the same button is recognized. I run this code already very long from FSX over several P3D versions. Until my upgrade to 5.2 (and 5.2 with HF1) it worked without any problem. And another strange thing: One time it's NAV1, the other time it might be another button from a completely other module. I know, that you don't have any chance to reproduce - even I am not able to have a scenarion, where it always happens. My hope is, that others might experience the same and that we can come to a pattern. Rgds Reinhard
  7. Hi, I am running P3D 5.2 HF 1 (version 5.2.22.27615) and FSUIPC 6.1.2 on WIN 10 with the latest updates. I have connected to my simulator several GoFlight hardware devices. I use them since already FSX days. I handle the input from these devices via LUA modules using the event.button function. Since switching to 5.2 from 5.1 I have the problem, that few of the registered event.button functions (and sometimes also the event.offset functions) don't fire. Most of the buttons are working normally. The buttons themselves are recognized by FSUIPC, which I can check on the buttons page in the FSUIPC UI. And there are always some different buttons, where the events are not detected by LUA. Completely random. The FSUIPC logfile shows no errors and I didn't change anything during the upgrade. If I manually restart the single module, where one or more event.button functions are not firing, via ipc.runlua(), the module works then as expected. I start all my modules per ipc.runlua() out of a loop in a start module. This always worked fine in the past. The table AC.GF holds the specific modules for the current aircraft. local k=0 local j=0 local v="" for k in pairs(AC.GF) do for j,v in ipairs(AC.GF[k]) do ipc.runlua ( v ) ipc.sleep(1000) ipc.log (v.." initialized") end end As the error is randomly occuring, I have no idea, how to find the reason. The only common thing is, that it has todo with the handling of events in LUA. When I upgraded to P3D 5.2 there was also a WIN 10 update provided at the same time (2021-06 Windows 10 21H1). Not sure if it is P3D 5.2 or maybe the WIN 10 update producing this random errors. . Anyhow since that time I can't be sure, that all of my programmed events are really working. And it's independent of the plane I am using. Maybe you have an idea, what might have changed with the event handling in 5.2. Best regards Reinhard FSUIPC6.log
  8. Hi, You could check this posting in the A2A forum: https://a2asimulations.com/forum/viewtopic.php?t=39914 At the the end there are mentioned two variables reflecting the transponder mode. With a little bit of LUA code monitoring these variables you could trigger the right vPilot actions. Rgds Reinhard
  9. I did not mean you Joe, but the user rustam, whom I quoted... Rgds Reinhard
  10. Hi, I think you missed that simple solution, which I also use if I just have to set LVars by buttons. The macros mentioned by Paul are NOT mouse macros (which don't work in your aircraft) but just simple LVar macros, which ALWAYS work. You will find more details in the Advanced User Manual. The MCRO file looks like this example: [Macros] 1=L:idle eng=Set 2=L:idlebit=Set 3=L:B407_Eng_Start_Switch=Set Adding such a macro file to your FSUIPC directory allows you then to simply assign these commands to any button. Beside the Set function there are several others too (Toggle, etc.). Using this method simply needs no programming, if you just have to set some LVars. Rgds Reinhard
  11. Hi, Just one hint for your implementation: I found out some time ago, that having more smaller LUA programs handling button and other events is a lot better in terms of performance than packing all your functions into one large LUA. And as a side efect: A smaller LUA program is much easier to read and maintain, than a loooong LUA script. Rgds Reinhard
  12. Dear John, It works perfectly again. Thanks for fixing this so quick! I did run it with EnableExtraButtons=Yes and it's working again from LUA with the event.button triggers. Best regards Reinhard
  13. Hi, Thanks for checking my problem. I did a quick test with EnableExtraButtons=No . It does not change the behavior. The POV buttons are recognized in the button assignment tab of the FSUIPC UI but not within LUA using the event.button trigger. So as I could stay on 6.0.13, there is no problem for me, until you find the reason. Following the thread about the beta pre-release of the 6.1.0 version, there are a lot of references, that some adjustments in the code have been made for the POV buttons. Maybe the LUA part also has to be adopted accordingly. Rgds Reinhard
  14. Hi, I upgraded from FSUIPC 6.0.13 to 6.1.0 (Win 10, P3D 5.1 latest HF) and suddenly my coolie on my Saitek yoke, which I use to switch camera settings via LUA code, did not work anymore. Other buttons on the yoke work normally. The buttons are also recognized, if you check them in the FSUIPC UI (button assignments). Only in LUA programs using the event.button trigger the buttons are not trapped anymore. The buttons, which are not recognized, are buttons 32 to 39. I stepped back to 6.0.13 and everything was working again. Upgrading to 6.1.0 and functionality is broken. So I reverted back to 6.0.13 at the moment. The strange thing is, that this only happens in LUA programs. And it's independent from the plane I am using. I checked the FSUIPC6.log file and both detected my hardware completely identically.No errors are shown. Maybe you could check this. Rgds Reinhard FSUIPC6_1_0.logFSUIPC6_0_13.log
  15. If you want to check your USB devices I recommend to use USBDevView: https://www.nirsoft.net/utils/usb_devices_view.html Rgds Reinhard
  16. Definitely - I use GF-Modules since many years always with the latest FSUIPC version. And it works with the versions mentioned by John. RGDS Reinhard
  17. Hi, LUA scripts are not executed automatically per default. You have to put a line into the [Auto] section of the INI file or you have to start the LUA procedure by assigning it to a button or key. Details are found in the manual for advanced users. Rgds Reinhard
  18. Hi, One question, which might be stupid, as I am not aware about the hardware you are using: Why are you not using four simple button assignments triggering the controls with the desired parameter? Rgds Reinhard
  19. Hi, You should look for LINDA, which provides out-of-the box functionality for most buttons. If you are an advanced programmer, you can check the coding of LINDA for the relevant mapping of buttons to LVars. A list of all LVars can be produced via the LUA sample code provided with FSUIPC. I enclosed the list for your reference. Here you find a small function toggling the APPR button: -- APPR function APPRToggle (joynum, button, downup) -- toggle APPR ipc.writeLvar("L:AB_AP_LOC2", 1 - ipc.readLvar("L:AB_AP_LOC2") ) ipc.writeLvar("SmallOverheadPushButtons", 1) end Rgds Reinhard LVar_AS_A3xx_Pro.txt
  20. Hi, Just to add: In the meanwhile I make it much easier: I have the LUA files per aircraft in a separate directory: <FSUIPC folder>\LUA\A320 <FSUIPC folder>\LUA\DH8D : In my master start routine I first determine the aircraft type out of the name read out of the FSUIPC offset. Then I start the necessary modules directly out of the subdirectory: ipc.runlua ( "LUA\\A320\\A320_GF_EmergLt" ) Attention: use the double \\ for subdirectories ! In fact I have a LUA table defined in a profile module and run each module out of a loop: -- init all GF functions defined in the AC profile local k=0 local j=0 local v="" for k in pairs(AC.GF) do for j,v in ipairs(AC.GF[k]) do ipc.runlua ( v ) ipc.sleep(500) ipc.log (v.." initialized") end end Profile: -- init GF tables AC.GF = {} -- GF-RP48 Unit 0 AC.GF.RP48_0 = { "LUA\\A320\\A320_GF_TOConf" , "LUA\\A320\\A320_GF_ASkid" , "LUA\\A320\\A320_GF_ECAM" , "LUA\\A320\\A320_GF_EmergLt" , "LUA\\A320\\A320_GF_SeatBelt" , "LUA\\A320\\A320_GF_NoSmoke" , "LUA\\A320\\A320_GF_WxrBright" , "LUA\\A320\\A320_GF_WxrTilt" , } -- GF-RP48 Unit 1 AC.GF.RP48_1 = { "LUA\\A320\\A320_GF_Bat" , "LUA\\A320\\A320_GF_Altern" , "LUA\\A320\\A320_GF_Avionics" , "LUA\\A320\\A320_GF_BusTie" , "LUA\\A320\\A320_GF_FuelPump" , "LUA\\P3D\\P3D_GF_ParkB" , "LUA\\A320\\A320_GF_APU" , "LUA\\A320\\A320_GF_IGN" , "LUA\\A320\\A320_GF_ABRK" , } Rgds Reinhard
  21. Hi Al, As my solution was mentioned: I had a similar problem like you with coupling several aircraft types to my GoFlight hardware. But by moving the necessary routines to sub directories per aircraft and by having a generic startup routine, which starts the necessary modules depending on the aircraft type loaded out of the respective subdirectory, the limit was no problem anymore. So I can definitely recommend to go for that approach. Rgds Reinhard
  22. Hi Rhys, The MD530F from Milviz only has a VC. But defining views with dedicated cockpit cameras (showing only the interior) is a very simple task. So if you have a separated outside view (what I assume that you have, as you are building a small cockpit), then you can arrange your camera views on your cockpit monitor(s). I am Using a Samsung ultra-wide 32:9 screen for the outside view and below two touch screens for the cockpit view (pilot/copilot) beside some GoFlight hardware. Here you find the manual: https://milviz.com/Online_products/Manuals/MV_MD530F_rev.pdf An here a review: http://www.raysaviation.mono.net/upl/11588/MilvizMVMD530LittleBird.pdf Rgds Reinhard
  23. Hi, Which helicopter add-on are you using as a base for your implementation? I own the Milviz MD500 and in that product the start procedure is exactly implemented according to the video. Rgds Reinhard
  24. Hi, In the documentation folder of the Aerosoft Airbus you will find a document "Vol7-Thrust Lever Setup.pdf". In that document two methods of setting up your controls are described: Without and with FSUIPC. Follow these instructions and it will work. The most important sentence: Rgds Reinhard
  25. Hi, I think, you clicked on the tag instead of going into the subsection of the useful programs and download the latest ZIP from there. I have just tested it and it works as planned. Rgds Reinhard
×
×
  • 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.