glennav8r Posted October 6, 2019 Report Posted October 6, 2019 I purchased a 64 button card from Leo Bodnar only to find out later about the 32 button limit with FSUIPC per device. I thought if I limit the total buttons to 32 spread across the whole card it would work okay but it looks like they all have to be allocated to buttons 1-32 as none of my buttons from 33-64 are working. I have soldered the card into a circuit board so it is not a simple process to reallocate each of the buttons. Is there a way to force the use of the buttons with numbers above 32 thought the ini file or similar? Regards Glenn
Thomas Richter Posted October 6, 2019 Report Posted October 6, 2019 Hi,, the structure of the used windows API checks only for the first buttons 0 to 31 (your buttons 1 to 32). It means any possible button above that is not seen, so there is no way to force something as Windows itself doesn't look for it in the first place. Thomas
glennav8r Posted October 6, 2019 Author Report Posted October 6, 2019 Hi Thomas Thanks for your reply. Back to the drawing board I guess. Regards Glenn
Pete Dowson Posted October 6, 2019 Report Posted October 6, 2019 6 hours ago, glennav8r said: I thought if I limit the total buttons to 32 spread across the whole card it would work okay but it looks like they all have to be allocated to buttons 1-32 as none of my buttons from 33-64 are working. I have soldered the card into a circuit board so it is not a simple process to reallocate each of the buttons. Is there a way to force the use of the buttons with numbers above 32 thought the ini file or similar? The entire number of buttons can be read and interpreted (best sent to "virtual buttons" for assignment) by using a Lua plug-in. A suitable Lua plug-in is provided, as an example, in your FSUIPC documents subfolder -- in the "Example Lua plug-ins" zip file. Look for "HidDemo.lua". That handles many axes and up to 256 buttons on a device, mapping them to "virtual buttons" in FSUIPC which will be seen in the Buttons & Switches tab and can be assigned there. All you should have to do is change these two lines: Vendor = 0x16C0 Product = 0x05B5 Get these values either from the FSUIPC log file, or possibly easier by using HidScanner (a small usitility in this thread: The other lines which you might want to change are: Device = 0 -- Multiple devices of the same name need increasing Device numbers. -- Logging on or off (to see when numbers you are getting) Logging = false -- Polling rate in number of polls per second Pollrate = 25 but this won't be needed for a simple button mapping. Pete
glennav8r Posted October 6, 2019 Author Report Posted October 6, 2019 Oh Pete you are a life saver. Thank you so much. Really appreciate your guidance. Regards Glenn.
ESzczesniak Posted October 20, 2019 Report Posted October 20, 2019 I found this topic, but am having some difficulties. The only LUA have used before is from the Aerosoft F-14 that automatically installed the files. I have the new Honeycomb Yoke that has >32 buttons, with the buttons over 32 being Magneto Left, Magneto Both, and Starter. I am using FSUIPC 5 in P3D v4.4 I copied the file HidDemo.lua from the Modules\FSUIPC Documents\Example LUA Plugins to the Modules folder. I renamed this AlphaYoke. From the FSUIPC5 file opened in Notepad, the relevant section is: 156 Product= Alpha Flight Controls 156 Manufacturer= Honeycomb Aeronautical 156 Serial Number= 96BB380E061A3B00 156 Vendor=294B, Product=1900 (Version 0.16) 156 GUIDs returned for product: VID_294B&PID_1900: 156 GUID= {3571F1B0-E9F5-11E9-8001-444553540000} 156 Details: Btns=35, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X255,Y255,Z0 I edited only new AlphaYoke.lua file to: ... Vendor = 294B Product = 1900 Device = 0 -- Multiple devices of the same name need increasing Device numbers. -- Logging on or off (to see when numbers you are getting) Logging = false -- Polling rate in number of polls per second Pollrate = 25 ... If I understood correctly, I should now see buttons 32-35 registers in the Buttons + Switches tab when I pressed them. Am I misunderstanding something, or doing something wrong?
John Dowson Posted October 21, 2019 Report Posted October 21, 2019 Is your lua running? You need to add it to the [Auto] section of your FSUIPC5.ini file - see page 40 of the Advanced User manual. John
ESzczesniak Posted October 22, 2019 Report Posted October 22, 2019 16 hours ago, John Dowson said: Is your lua running? You need to add it to the [Auto] section of your FSUIPC5.ini file - see page 40 of the Advanced User manual. John Thank you, and in short, no I had not found that section of the manual. Nor do I think the LUA is running still. To FSUIPC5.ini, I hadded [Auto] 1=Lua AlphaYoke The file AlphaYoke.lua is in the P3D\Modules folder. I do not get any effect utilizing these buttons over 32. My FSUIPC log file is below and I see the LUA referenced, but it says "malformed number" near the vendor ID: ********* FSUIPC5, Version 5.15 (27th November 2018) by Pete Dowson ********* Running inside Prepar3D v4 Module base=7FFA1F600000 Windows 10 Pro 64 Bit reported as Build 18362, Release ID: 1903 (OS 10.0) Prepar3D.exe version = 4.4.16.27077 Reading options from "F:\Prepar3D v4\Modules\FSUIPC5.ini" Checking the Registrations now ... User Name="Eric Szczesniak" User Addr="eszczesniak@gmail.com" FSUIPC5 Key is provided WIDEFS7 not user registered, or expired 0 System time = 21/10/2019 20:40:38 0 FLT path = "C:\Users\Eric Szczesniak\Documents\Prepar3D v4 Files\" 0 Using DialogMode 0 FS path = "F:\Prepar3D v4\" 78 ---------------------- Joystick Device Scan ----------------------- 78 Product= Saitek Pro Flight Quadrant 78 Vendor=06A3, Product=0C2D (Version 2.2) 78 GUIDs returned for product: VID_06A3&PID_0C2D: 78 GUID= {F308E0B0-E99E-11E8-8002-444553540000} 78 Details: Btns=9, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X255,Y255,Z255 78 GUID= {F94A49A0-E99E-11E8-8003-444553540000} 78 Details: Btns=9, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X255,Y255,Z255 78 Product= vJoy - Virtual Joystick 78 Manufacturer= Shaul Eizikovich 78 Serial Number= 2.1.8 78 Vendor=1234, Product=BEAD (Version 2.24) 78 GUIDs returned for product: VID_1234&PID_BEAD: 78 GUID= {B47CD7A0-57D2-11E9-8002-444553540000} 78 Details: Btns=8, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R32767,U32767,V32767,X32767,Y32767,Z32767 78 Product= Saitek Pro Flight Quadrant 78 Manufacturer= Saitek 78 Vendor=06A3, Product=0C2D (Version 2.2) 94 Product= MFG Crosswind V2 94 Manufacturer= MFG 94 Serial Number= MFG500001 94 Vendor=16D0, Product=0A38 (Version 33.1) 94 GUIDs returned for product: VID_16D0&PID_0A38: 94 GUID= {5D1C51B0-E843-11E8-8006-444553540000} 94 Details: Btns=2, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R4096,U0,V0,X4096,Y4096,Z0 157 Product= Alpha Flight Controls 157 Manufacturer= Honeycomb Aeronautical 157 Serial Number= 96BB380E061A3B00 157 Vendor=294B, Product=1900 (Version 0.16) 157 GUIDs returned for product: VID_294B&PID_1900: 157 GUID= {3571F1B0-E9F5-11E9-8001-444553540000} 157 Details: Btns=35, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X255,Y255,Z0 157 Product= Throttle - HOTAS Warthog 157 Manufacturer= Thrustmaster 157 Vendor=044F, Product=0404 (Version 1.0) 157 GUIDs returned for product: VID_044F&PID_0404: 157 GUID= {6B1B22B0-E8E7-11E8-8002-444553540000} 157 Details: Btns=32, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R16383,U1023,V0,X1023,Y1023,Z16383 157 ------------------------------------------------------------------- 157 Device acquired for use: 157 Joystick ID = 1 (Registry okay) 157 1=Saitek Pro Flight Quadrant 157 1.GUID={F308E0B0-E99E-11E8-8002-444553540000} 157 Device acquired for use: 157 Joystick ID = 5 (Registry okay) 157 5=Saitek Pro Flight Quadrant 157 5.GUID={F94A49A0-E99E-11E8-8003-444553540000} 157 Device acquired for use: 157 Joystick ID = 3 (Registry okay) 157 3=vJoy Device 157 3.GUID={B47CD7A0-57D2-11E9-8002-444553540000} 157 Device acquired for use: 157 Joystick ID = 0 (Registry okay) 157 0=MFG Crosswind V2 157 0.GUID={5D1C51B0-E843-11E8-8006-444553540000} 157 Device acquired for use: 157 Joystick ID = 4 (Registry okay) 157 4=Alpha Flight Controls 157 4.GUID={3571F1B0-E9F5-11E9-8001-444553540000} 157 Device acquired for use: 157 Joystick ID = 2 (Registry okay) 157 2=Throttle - HOTAS Warthog 157 2.GUID={6B1B22B0-E8E7-11E8-8002-444553540000} 157 ------------------------------------------------------------------- 172 LogOptions=00000000 00000001 172 ------------------------------------------------------------------- 172 SimConnect_Open succeeded: waiting to check version okay 172 Opened separate AI Traffic client okay 172 ### PDKmodeHelper callback registered! 6250 Running in "Lockheed Martin® Prepar3D® v4", Version: 4.4.16.27077 (SimConnect: 4.4.0.0) 6250 Initialising SimConnect data requests now 6250 FSUIPC Menu entry added 6250 ... Using Prepar3D with Academic License 6282 C:\Users\Eric Szczesniak\AppData\Local\Lockheed Martin\Prepar3D v4\Prepar3D_Default.fxml 6282 F:\Prepar3D v4\SimObjects\Airplanes\IRIS Raptor Driver\Raptor.air 13000 ### The user object is 'F-22 Raptor - 525th Fighter Squadron' 13000 ### Mode is NORMAL 13516 ### Mode: PAUSE on 51438 Loading Complete ... 51532 ### Mode is NORMAL 52235 User Aircraft ID 1 supplied, now being used 52250 Aircraft loaded: running normally now ... 53110 System time = 21/10/2019 20:41:31, Simulator time = 20:40:46 (01:40Z) 53110 Aircraft="F-22 Raptor - 525th Fighter Squadron" 66266 F:\Add-ons\A2A\SimObjects\Airplanes\A2A_C182\C182.air 66844 Aircraft="C182_VH-DLL" 68407 -------------------- Starting everything now ---------------------- 68453 *** LUA Error: F:\Prepar3D v4\Modules\AlphaYoke.lua:14: malformed number near '294B' 68469 ASN active function link set 68469 Ready for ActiveSky WX radar with additional data 69532 Advanced Weather Interface Enabled 88594 === Closing session: waiting for DLLStop to be called ...
aua668 Posted October 22, 2019 Report Posted October 22, 2019 Hi, There is an error in your routine in line no 14. It's simply not executing: 68453 *** LUA Error: F:\Prepar3D v4\Modules\AlphaYoke.lua:14: malformed number near '294B' Rgds Reinhard
John Dowson Posted October 22, 2019 Report Posted October 22, 2019 On 10/20/2019 at 10:48 PM, ESzczesniak said: Vendor = 294B Product = 1900 These should be Vender = 0x294B Product = 0x1900
ESzczesniak Posted October 23, 2019 Report Posted October 23, 2019 Thank you! This is working now! What I think will be one last question. Now with this LUA running, buttons 1-32 register briefly as H 31 (H just happens to be the letter for this Yoke) and then 65 61 (65 I presume to be the virtual device). I currently have buttons 1-32 programmed under the "H" device, with only 33-35 under "65". Does it matter which device they are programmed under? For momentary contact buttons, it seems probably not. But what about "repeat while held" buttons? At least watching through FSUIPC, it seems there's a small, but noticeable delay from when H X is displayed to 65 Y populates through the LUA. Perhaps none of this matters, but I was just curious what the recommended process would be to avoid problems.
John Dowson Posted October 23, 2019 Report Posted October 23, 2019 10 hours ago, ESzczesniak said: Does it matter which device they are programmed under? You have to program under the device the button press is received. 10 hours ago, ESzczesniak said: there's a small, but noticeable delay from when H X is displayed to 65 Y populates through the LUA Not sure what you mean by this, but I would expect a small delay if the button press is going via lua + virtual buttons. 10 hours ago, ESzczesniak said: Perhaps none of this matters Probably not! You could look into tuning the ButtonRepeat rate if the delay is an issue, but this would affect all buttons. Best just to try and adjust for your needs if needed. John
ESzczesniak Posted October 23, 2019 Report Posted October 23, 2019 4 hours ago, John Dowson said: You have to program under the device the button press is received. I may not have explained this well. The same button pressed just once registers first under the physical hardware device, then a moment later under the virtual device created by the LUA. I have tested on the ramp, and it does not seem to matter if it's programmed through the physical hardware device or the virtual device. The only thing I haven't tested yet is trim, which is a repeat while held scenario. I will have to test this later and see.
John Dowson Posted October 23, 2019 Report Posted October 23, 2019 2 minutes ago, ESzczesniak said: The same button registers first under the physical hardware device, then a moment later under the virtual device created by the LUA Ah, ok. That makes sense. But presumably for only the first 32 buttons (0-31). The remaining buttons would only send via the virtual device. I don't think the repeat rate will be a problem using virtual buttons, but, as you say, just try and see. John
ESzczesniak Posted October 23, 2019 Report Posted October 23, 2019 2 hours ago, John Dowson said: Ah, ok. That makes sense. But presumably for only the first 32 buttons (0-31). The remaining buttons would only send via the virtual device. I don't think the repeat rate will be a problem using virtual buttons, but, as you say, just try and see. John Had a chance to test this now and it all seems to work. Thank you for your help!
Roland Posted November 4, 2019 Report Posted November 4, 2019 With LINDA you can assign all 35 Buttons without any virtual Button. Andrew from LINDA answered to me: Quote Thank you for the feedback. LINDA extracts the number of axis and buttons directly from the device. It just needs the button reference to initiate the assigned function. Obviously, FSUIPC has a built in limit. If you feed this back to the FSUIPC support forum I am sure that the developer will make the necessary changes for this new device.
moosestaffa Posted January 4, 2021 Report Posted January 4, 2021 Ok so I am clearly doing something wrong, but cannot figure out what. Like the user above I have edited the HIDdemo.lua file and renamed it to Bravo.lua and placed it in my Modules folder All I changed in the file was: Vendor = 0x294BProduct = 0x1901 Which is my Bravo Throttle Quadrant I also went into my FSUIPC.ini file and added [Auto] 1=Lua Bravo Yet I still don't see the buttons on the Bravo that are above 31. I even tried changing the Vendor to = 294B to intentionally break it to see if it would give me a LUA error in the log like the user above, but nothing shows up on the log regarding Lua. Any thoughts as to what I am missing? My FSUIPC Log file is below: ********* FSUIPC5, Version 5.124 (27th February 2018) by Pete Dowson ********* Running inside Prepar3D v4 Module base=7FFBB14E0000 Windows 10 Pro 64 Bit reported as Build 19042, Release ID: 2009 (OS 10.0) Prepar3D.exe version = 4.5.13.32097 Reading options from "C:\Lockheed Martin\Prepar3D v4\Modules\FSUIPC5.ini" Checking the Registrations now ... User Name="Mike Bergman" User Addr="mbergman83@gmail.com" FSUIPC5 Key is provided WIDEFS7 not user registered, or expired 0 System time = 04/01/2021 13:34:22 0 FLT path = "C:\Users\mberg\Documents\Prepar3D v4 Files\" 0 ------ Module Version Check ------ 0 acontain.dll: 4.5.13.32097 0 api.dll: 4.5.13.32097 0 controls.dll: 4.5.13.32097 0 fs-traffic.dll: 4.5.13.32097 0 G3D.dll: 4.5.13.32097 0 language.dll: 4.5.13.32097 0 sim1.dll: 4.5.13.32097 0 visualfx.dll: 4.5.13.32097 0 weather.dll: 4.5.13.32097 0 window.dll: 4.5.13.32097 0 ---------------------------------- 0 Using PDK events 0 Using DialogMode 32 FS path = "C:\Lockheed Martin\Prepar3D v4\" 125 ---------------------- Joystick Device Scan ----------------------- 125 Product= Bravo Throttle Quadrant 125 Manufacturer= Honeycomb Aeronautical 125 Serial Number= 37F22D02140B3B00 125 Vendor=294B, Product=1901 (Version 1.5) 141 GUIDs returned for product: VID_294B&PID_1901: 141 GUID= {51F1D8A0-4944-11EB-8001-444553540000} 141 Details: Btns=48, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R1023,U1023,V1023,X1023,Y1023,Z1023 141 Product= Control Manager ID #00 141 Manufacturer= Control Manager ID #00 141 Serial Number= Control Manager ID #00 141 Vendor=068E, Product=C0F2 (Version 0.0) 141 GUIDs returned for product: VID_068E&PID_C0F2: 141 GUID= {679A2830-5E42-11EA-8004-444553540000} 141 Details: Btns=0, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X255,Y255,Z255 141 Product= Alpha Flight Controls 141 Manufacturer= Honeycomb Aeronautical 141 Serial Number= 53FE38191B2E3B00 141 Vendor=294B, Product=1900 (Version 0.16) 141 GUIDs returned for product: VID_294B&PID_1900: 141 GUID= {FFF7ED90-5D95-11EA-8004-444553540000} 141 Details: Btns=35, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X255,Y255,Z0 141 ------------------------------------------------------------------- 141 Device acquired for use: 141 Joystick ID = 3 (Registry okay) 141 3=Bravo Throttle Quadrant 141 3.GUID={51F1D8A0-4944-11EB-8001-444553540000} 141 Device acquired for use: 141 Joystick ID = 1 (Registry okay) 141 1=CH Pro Pedals USB 141 1.GUID={679A2830-5E42-11EA-8004-444553540000} 141 Device acquired for use: 141 Joystick ID = 2 (Registry okay) 141 2=Alpha Flight Controls 141 2.GUID={FFF7ED90-5D95-11EA-8004-444553540000} 141 ------------------------------------------------------------------- 282 LogOptions=00000000 00000001 297 ------------------------------------------------------------------- 297 SimConnect_Open succeeded: waiting to check version okay 297 Opened separate AI Traffic client okay 11922 Running in "Lockheed Martin® Prepar3D® v4", Version: 4.5.13.32097 (SimConnect: 4.5.0.0) 11922 Initialising SimConnect data requests now 11922 FSUIPC Menu entry added 11938 ... Using Prepar3D with Professional License 12000 C:\Users\mberg\AppData\Local\Lockheed Martin\Prepar3D v4\Prepar3D_Default.fxml 12000 C:\Lockheed Martin\Prepar3D v4\SimObjects\Airplanes\IRIS Raptor Driver\Raptor.air 119282 Loading Complete ... 120000 User Aircraft ID 2 supplied, now being used 120000 Aircraft loaded: running normally now ... 120782 System time = 04/01/2021 13:36:23, Simulator time = 13:34:35 (19:34Z) 120797 Aircraft="F-22 Raptor - 525th Fighter Squadron" 121813 -------------------- Starting everything now ---------------------- 121828 ASN active function link set 121828 Ready for ActiveSky WX radar with additional data 122891 Advanced Weather Interface Enabled 134266 === Closing session: waiting for DLLStop to be called ...
moosestaffa Posted January 5, 2021 Report Posted January 5, 2021 Ok I got it to work. Didn't realize I had to install a lua program... seems that wasn't mentioned in all the videos I watched. Was able to find it on Github.
John Dowson Posted January 5, 2021 Report Posted January 5, 2021 12 hours ago, moosestaffa said: Like the user above I have edited the HIDdemo.lua file and renamed it to Bravo.lua and placed it in my Modules folder There are now specific scripts for handling buttons > 32 for the Honeycomb Alpha and Bravo - you may be better off using these: hidBravoButtons.luahidAlphaButtons.lua I will add these to the lua plug-in examples for the next release. 3 hours ago, moosestaffa said: Didn't realize I had to install a lua program Really - you did say 'and placed it in my Modules folder', which is where it goes (i.e. your FSUIPC installation folder, wherever that is). Anyway, glad its now working. 12 hours ago, moosestaffa said: ********* FSUIPC5, Version 5.124 (27th February 2018) by Pete Dowson ********* You are using an old unsupported version if FSUIPC5. Only the latest version is supported, please update to v5.157 (see www.fsuipc.com). John
moosestaffa Posted January 6, 2021 Report Posted January 6, 2021 Oh thanks, I will try out those lua files you attached. Quote Really - you did say 'and placed it in my Modules folder', which is where it goes (i.e. your FSUIPC installation folder, wherever that is). Anyway, glad its now working. I had placed the edited HIDdemo.lua file in the Modules folder... I figured there must be some software I was supposed to download to make Lua work, but until I watched a particular YouTube tutorial, nothing ever seemed to reference it so I thought maybe it was coded into FSUIPC... anyway, water under the bridge. Quote You are using an old unsupported version if FSUIPC5. Only the latest version is supported, please update to v5.157 (see www.fsuipc.com). Yes I actually updated after that post in attempt to see if that fixed my issue... it didn't at the time, but I now am on 5.157
moosestaffa Posted January 6, 2021 Report Posted January 6, 2021 Oh those are soooo much better! Now I don't have duplicate buttons! You are are awesome!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now