Jump to content
The simFlight Network Forums

Delta14Sierra

Members
  • Posts

    50
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Delta14Sierra

  1. Problem resolved. Thank you so much for sharing your expertise.
  2. John, Thank you for your assistance. From my FSUIPC7.log (see attached): 281 Registered HotKey 'InvokeFSUIPCOptionsKey' (key=0x46, modifier=0x1) After rebooting, ALT-F still does not open FSUIPC7. If I ALT-TAB while in MSFS, I can see that FSUIPC7 is running and connected to MSFS (see attached image). FSUIPC7.log
  3. I installed FSUIPC 7.4.11, but noticed that I was unable to access the user interface via ALT-F. Thinking there might be an issue with it, I reinstalled 7.4.10, making sure my user registration info was correct, but still have the same problem. FSUIPC splash screen appears when loading MSFS, but ALT-F does not bring up the FSUIPC User Interface. Furthermore, if I ALT-TAB, FSUIPC shows that it is connected to MSFS, but it is greyed out. What do I need to do to gain access again to the FSUIPC user interface? Have a great day! Thank you.
  4. John, Thank you so much for that instructional insight which now removes the period when it is the fourth character. But then I found that my GF-166 display was showing 00.0 - 09.9 when the cockpit DME shows 0.0 - 9.9. So I applied your insight and included an elseif statement which now also strips the leading zero. function Distance1(offset,value) -- NM1 if (string.byte(value, 4) == 46) then -- is 4th character a period (46)? miles1 = string.sub(value, 1, 3) elseif (string.byte(value, 1) == 48) then -- is leading character a zero (48)? miles1 = string.format("%1.1f",value) else miles1 = value end prevswitch = -1 -- updates Distance end There probably is another way to strip the leading zero, but this replicates the cockpit DME on my GF-166 which is what I was hoping to accomplish. Thank you for sharing your expertise. Dan
  5. I thought had a solution, but after testing, it did not work.
  6. I am using a Goflight GF-166 as a DME which includes the following Lua script... function Distance1(offset,value) if (value <= "100") then miles1 = string.format("%3.1f",value) else miles1 = string.format("%s",value) end prevswitch = -1 -- updates Distance end event.offset(0x0C29,"STR",4,"Distance1") -- DME1 Distance When less than 100 miles, miles1 displays both miles and tenths/mile (e.g., 0.5 7.5 10.5 99.9 ), as it should. However, when more than 100 miles, miles1 displays just the miles as a whole number, but the decimal point remains (e.g., 100. 105. 115. ). Is there a way to rid of the decimal point altogether when more than 100 miles?
  7. FYI...Download link is showing FSUIPC7 v7.4.3, but install says it is FSUIPC v7.4.2.
  8. John, Thank you so much for your kind assistance. I have BU0836X-2.lua working and am focusing on getting it dialed in before I work on ButtonBox.lua. In FSUIPC.ini, I have added the line: IgnoreThese=H.10, H.11, H.12, H.13, H.14, H.15, H.16, H.17, H.18, H.19 It correlates with the 5 rotary encoders on this board. However, I am finding it a challenge in Button & Switch Assignments to differentiate between which is fast and which is slow. No matter how fast or slow I turn the rotary, it seems to be finicky as to which button number it provides me for assignment. Here is what I currently have, but I have also tried flipping the fast and slow button assignments in each rotational direction. 132=P64,17,C1027,0 -{vor1 obi inc fast}- 133=P64,16,C65663,0 -{VOR1_OBI_INC}- 134=P64,15,C65662,0 -{VOR1_OBI_DEC}- 135=P64,14,C1026,0 -{vor1 obi dec fast}- Either way, I get an inconsistent response between fast and slow movement of the VOR...sometimes fast adjustment when turning slow, and slow adjustment when turning fast. My assumption is that this has to do with the FastTimeLimit = 60 and Pollrate = 20 settings. I have been trying different values (increasing the FastTimeLimit, and decreasing the Pollrate), but I am struggling to find a sweet spot. I have been making adjustments to BU0836X-2.lua while in FS2020, but I just am not getting any feel for whether I am adjusting in the right direction. Any insight as to make this process easier would be most appreciated. Once again, thank you for bearing with me. Have a great day! Dan
  9. John, I made the offset change to the second script and tried the various VID/PID values. I ran each script separately. I do not find the message "Could Not Open HID" (I assume it would appear in the INI file), nor does Logging Lua Plugins or Logging Lua Separately produce any error messages for either of the rotary scripts. Where do I find the new fast/slow virtual buttons? Thank you for your patience and kind assistance. Dan FSUIPC7.ini FSUIPC7.log
  10. John, Thank you so much for your prompt reply and direction. I have added the [Auto] section along with Lua entries and corrected the <MISSING JOYSTICK> entries/associations in FSUIPC.ini. I have also tried using both 0 and 1 for the Device number of each board in their respective Lua scripts. However, I still do not get the intended outcome with the rotaries. Furthermore, when I add the IgnoreThese entry under [Buttons], I get no response at all from the rotaries in Buttons & Switches Assignments. Observation: While troubleshooting, I noticed that although one of my encoders is wired on the ButtonBox board to B21 and B22, yet it shows up in FSUIPC as J.20 and J.21. The same pattern applies to the rest of my encoders. Is this because FSUIPC starts numbering with 0 rather than 1, or could this be part of my issue? Using the Bodnar Encoder Configuration application, I have set up the connected encoders as 1:2 with a 56ms Pulse Width. Any further insight would be most appreciated.
  11. John, I am stuck in trying to implement the rotaries.lua on 2 Leo Bodnar boards with a total of 11 rotary encoders. I renamed the rotaries.lua script to reflect each of the Bodnar boards (BU0836X-2.lua & ButtonBox.lua; see attached). I adjusted the Vendor/Product/Rotaries parameters to reflect the specifics of each board (5 encoders with BU0836X-2; 6 encoders with ButtonBox), however, I am uncertain if I have the correct Device number for each board (I also have another BU0836X-1, but it does not have any encoders assigned to it). The boards show up in both FSUIPC.log and FSUIPC.ini (see attached). However, I do not see any change in speed when turning the encoders. When I include IgnoreThese=H.10, H.11, H.12, H.13, H.14, H.15, H.16, H.17, H.18, H.19, J.20, J.21,J.22,J.23,J.24,J.25,J.26,J.27,J.28,J.29.J.30,J.31 under [Buttons], each of the rotary encoders no longer show any interaction under Button & Switch Assignments in FSUIPC and I am unable to reassign the encoders to their respective assignments. I am at a loss and am trusting you could help me sort this out. Respectfully, Dan FSUIPC7.log FSUIPC7.ini BU0836X-2.lua ButtonBox.lua
  12. I have simplified things to the following which works just as I had hoped. Again, thank you, everyone! function VS_Hold(offset, value) if (value > 9900) then value = 65536 - value value = "-"..value end gfd.SetDisplay(GF166, ID, 0, value) end event.offset(0x07F2, "SW", "VS_Hold")
  13. Thank you, everyone! Works both as UD and SW. I have left it as SW. Blessed Easter! You made my day!
  14. In Lua, I am able to get the ascent value of the AP Vertical Speed Hold Var (0x07F2) to display correctly in the left window of my GoFlight GF166 (see Lua script below) However, when adjusting for a descent value, I get a value of 65436 for -100, and that value reduces by 100 for each subsequent negative value (e.g., 65436, 65336, 65236, etc.). How do I get the negative value to display correctly (e.g., -100, -200, -300, etc.)? Any help would be most appreciated. function VS_Hold(offset, value) gfd.SetDisplay(GF166, 1, 0, string.format("%4.0f",value)) end event.offset(0x07F2, "UD", "VS_Hold")
  15. FYI...  The requested URL /beta/FSUIPC4956.zip was not found on this server.

  16. Pete, WOW! Awesome! It works great! I really do appreciate the time you have taken above and beyond my initial concern to help me with this! You have given me new insight into LUA and how to make it work with my GF modules. I look forward to implementing what you have taught me here in my other LUA plugins. Again, thank you so very much! Dan
  17. Pete, Just as a test... Using my original DME plugin, I replaced the ipcPARAMs portion with your Select function, and then set up the encoder in FSUIPC accordingly using LuaValue. The very same problem occurs. Not sure if this narrows things down. Dan
  18. Pete, Thank you again for your time and help on this! The problem remains the same. The switch will move between the OFF and DME1 positions and display accordingly on both the GF-166 and the FSX panel. However, the switch will not move to the HOLD or the DME2 positions. I have made sure that the encoder is set in FSUIPC to LuaValue DME: 1=Rotate Left; 2=Rotate Right. I have tested the plugin by commenting out the L:Var reads, first one, then the other, then both. When both L:Var reads are commented out, I have to first rotate the GF-166 encoder to the left and then to the right before it will display on the GF-166. Also, with both L:Var reads commented out, the GF-166 display no longer responds to the DME switch changes on the FSX panel. Obviously, without the L:Var reads, the FSX panel in the Beech Duke looses interaction with the plugin. I have tried altering the sleep value to 100, but that appears to have no affect whatsoever. Again, when I use the mouse to rotate the DME switch on the FSX panel (with the L:Var reads), the display on the GF-166 responds appropriately. The problem is in getting the encoder on the GF-166 to do the same thing. I will have fun tinkering on my end until I hear back from you. Dan
  19. Pete, We have a good start but there is a snag. When using the GF-166 encoder, the switch will move between the OFF and DME1 positions and display accordingly on both the GF-166 and the FSX panel. However, the switch will not move to the HOLD or the DME2 positions. When rotating the switch on the FSX panel in the Beech Duke, everything displays just fine on the GF-166. Thank you for doing this. I am drawing a lot of insight from looking over what you have done. This is most helpful and I am most appreciative! Dan
  20. Pete, If you have the time to revise the plug-in, I would certainly appreciate it and am confident that I would learn a lot by your doing so! Just to confirm, I have downloaded/installed FSUIPC 4.834 and the CTD issue is gone. To answer some of your questions that may still be relevant... I use LINDA to interface with physical switches I have wired to two Leo Bodnar BU0836X boards. I am not sure where/when I got it. I have since downloaded and installed 2.0.10.1. I first stumbled upon the CTD when using the encoder to turn the DME off. In that instance, rather than rotate the encoder one click at a time to simply turn the display off, I had rotated the encoder quickly resulting in multiple clicks and the subsequent CTD. So there really is no "need" to rotate the encoder quickly. That was simply the circumstance that happened to cause the CTD. This section simply mimics the "HOLD" function of the Beech Duke DME by hashing out (---) the displays. While I do not recall for sure (I wrote this portion way back in October), I vaguely recall that either the gfd.SetDisplay would not display properly on the GF-166 or I would get some kind of error message without the inclusion of the FUNCTIONs. This section was purely the result of trial and error. For some reason, it worked. In fact, this plugin was my very first attempt at working with LUA in conjunction with a GoFlight module. I repeatedly tinkered trying things I read in the manuals and found on the internet until the plugin worked. And in spite of the mess in coding I may have made, it has worked fine for me until recently. If there is further input you need from me, let me know. Thank you for your time and your help! Dan
  21. Pete, I have been successfully using the below LUA script (DME.lua) in FSX to make a GoFlight GF-166 function as a DME. The ipcPARAMs 1 & 2 are assigned to the GF-166 encoder via FSUIPC. Whether rotating the encoder slowly or quickly, this script has been working without any issue when using FSUIPC up to and including version 4.827. However, with more recent versions of FSUIPC, including 4.833, this script causes a CTD. If I slowly rotate the encoder either way one click at a time, the DME script works just fine. But if I quickly over-rotate the encoder creating multiple clicks, that is when I get the CTD. I have included the offending LUA script below along with the respective FSUIPC.log. If there are other files I need to forward, please let me know. Dan -- Launched from ipcReady.lua -- Initialize GFunit = 1 switch = ipc.readLvar("L:DME_Switch") -- Reads DME Selector State gfd.SetBright(GF166,GFunit,15) if ipcPARAM == 1 then if switch > 0 then -- limits encoder switch from going below 0 switch = switch - 1 ipc.writeLvar("L:DME_Switch", switch) -- DME Selector Rotate Left ipcPARAM=0 -- Clears ipcPARAM else end ipc.sleep(10) end if ipcPARAM == 2 then if switch < 3 then -- limits encoder switch from going above 3 switch = switch + 1 ipc.writeLvar("L:DME_Switch", switch) -- DME Selector Rotate Right ipcPARAM=0 -- Clears ipcPARAM else end ipc.sleep(10) end if switch == 0 then function Distance(offset, value) end function Speed(offset, value) end function Time(offset, value) end gfd.SetDisplay(GF166, GFunit, 0, "") gfd.SetDisplay(GF166, GFunit, 1, "") end if switch == 1 then gfd.SetBright(GF166,GFunit,15) ipc.writeUW("0378", 1) -- Set to DME1 function Distance(offset, value) miles = ipc.readSTR("0C29", 4) -- Reads DME1 NM miles = "1 " .. miles -- Formats DME1 Distance Display end function Speed(offset, value) kts = ipc.readSTR("0C2E", 3) -- Reads DME1 Speed end function Time(offset, value) min = ipc.readUW("0304", 2) -- Reads DME1 MIN min = min / 10 -- convert data to seconds min = min / 60 -- convert seconds to minutes if min == 16.665 then min = 0 else min = math.floor(min) -- rounds decimal down end gfd.SetDisplay(GF166, GFunit, 0, miles) -- Display DME1/NM L Window gfd.SetDisplay(GF166, GFunit, 1, kts .. (string.format(" %02.f", min))) -- Display DME1 KTS/MIN in R Window end end if switch == 2 then function Distance(offset, value) end function Speed(offset, value) end function Time(offset, value) end gfd.SetDisplay(GF166, GFunit, 0, "H ---") gfd.SetDisplay(GF166, GFunit, 1, "--- --") end if switch == 3 then ipc.writeUW("0378", 2) -- Set to DME2 function Distance(offset, value) miles = ipc.readSTR("0C33", 4) -- Reads DME2 NM miles = "2 " .. miles -- Formats DME2 Display end function Speed(offset, value) kts = ipc.readSTR("0C38", 3) -- Reads DME2 Speed end function Time(offset, value) min = ipc.readUW("030A", 2) -- Reads DME2 MIN min = min / 10 -- convert data to seconds min = min / 60 -- convert seconds to minutes if min == 16.665 then min = 0 else min = math.floor(min) -- rounds decimal down end gfd.SetDisplay(GF166, GFunit, 0, miles) -- Display DME2/NM L Window gfd.SetDisplay(GF166, GFunit, 1, kts .. (string.format(" %02.f", min))) -- Display DME2 KTS/MIN in R Window end end event.offset("0C29", "STR", 4, "Distance") event.offset("0C2E", "STR", 3, "Speed") event.offset("0304", "STR", 2, "Time") event.offset("0C33", "STR", 4, "Distance") event.offset("0C38", "STR", 3, "Speed") event.offset("030A", "STR", 2, "Time") [/CODE] [CODE] ********* FSUIPC4, Version 4.833 by Pete Dowson ********* User Name="" User Addr="" FSUIPC4 Key is provided WIDEFS7 not user registered, or expired Running inside FSX on Windows 7 Module base=61000000 468 System time = 05/06/2012 20:10:13 468 FLT path = "C:\Users\D14S\Documents\Flight Simulator X Files\" 500 Trying to connect to SimConnect Acc/SP2 Oct07 ... 531 FS path = "D:\Microsoft Flight Simulator X\" 2793 Run: "D:\Microsoft Flight Simulator X\Modules\linda.exe" 2902 Run: "D:\Microsoft Flight Simulator X\Modules\NAVCOM_v8a.exe" 2996 LogOptions=00000000 00000001 3011 Wind smoothing fix is fully installed 3011 G3D.DLL fix attempt installed ok 3011 SimConnect_Open succeeded: waiting to check version okay 3011 Trying to use SimConnect Acc/SP2 Oct07 10920 Running in "Microsoft Flight Simulator X", Version: 10.0.61637.0 (SimConnect: 10.0.61259.0) 10920 Initialising SimConnect data requests now 10920 FSUIPC Menu entry added 11061 C:\Users\D14S\Documents\Flight Simulator X Files\000-Sedona.FLT 11061 D:\Microsoft Flight Simulator X\SimObjects\Airplanes\RealAir Duke Turbine\RealAir_Duke_Turbine.AIR 89202 System time = 05/06/2012 20:11:42, Simulator time = 20:10:20 (03:10Z) 90715 Aircraft="RealAir Beech Duke Turbine Winglets Era" 225406 Starting everything now ... 225453 Using "D:\Microsoft Flight Simulator X\Modules\GFDEV.DLL", version 2.1.0.1 225453 GoFlight GFLGT detected: 1 device 225453 GoFlight GF166 detected: 5 devices 225453 GoFlight GFMCP detected: 1 device 225453 GoFlight GFRP48 detected: 3 devices 225453 LUA.0: beginning "D:\Microsoft Flight Simulator X\Modules\ipcReady.lua" 225453 LUA.0: ended "D:\Microsoft Flight Simulator X\Modules\ipcReady.lua" 225703 LUA.16: 225703 LUA.16: [INIT]LINDA:: Loading... 225796 LUA.16: LINDA:: Aircraft: RealAir Beech Duke Turbine Winglets 225812 LUA.16: LINDA:: Aircraft module detected: RealAir Duke Turbine 225890 LUA.1: LINDA:: AivlaSoft library loaded... 225890 LUA.1: LINDA:: FSX standard library loaded... 225905 LUA.1: LINDA:: IAO library loaded... 225905 LUA.1: LINDA:: RealityXP library loaded... 225905 LUA.1: LINDA:: A2A MAP library loaded... 225983 LUA.1: LINDA:: Loading RealAir Duke Turbine joysticks config... 225983 LUA.1: LINDA:: Module: RealAir Duke Turbine Started... 226139 LUA.1: LINDA:: Ready to go, Captain! 226139 LUA.1: LINDA:: 226233 LUA.1: LINDA:: [S] LVars watching list cleared... 226295 LUA.1: LINDA:: [S] Offsets watching list cleared! 228058 Advanced Weather Interface Enabled 231756 PFC Menu entry added 256747 LogOptions changed, now 80000000 00000001 [/CODE]
  22. FSX loads without issue with 4.822. Well done, Pete! Thanks!
  23. Pete, Sorry for not getting back to you sooner. As I stated previously, I was away from my computer for a few days. My current "working" version of FSUIPC is 4.811. The only LUA logging feature I see in FSUIPC is for "LUA program logging." If "Debug/Trace Lua plug-ins" is a feature that has been added since 4.811, then I am afraid I may not be able to help. Any version of FSUIPC beyond 4.811 shuts FSX down before I can even access the FSUIPC setup. If there is another way to access/activate this feature without having to go into FSUIPC, then please advise. Dan
×
×
  • 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.