Cool Dan Luke Posted December 21, 2020 Report Posted December 21, 2020 (edited) I'm trying to program LUA script to detect the toggle switches in Honeycomb Bravo throttle quadrant. The switches are 34 to 47. I tried the following: Capture button events using event library: event.button(HCA, 34, "Function_ProcessButton34") This event never fires. I tried with switches lower than 32 and they work. Nothing fires for switches 32 and higher. Read button states during Poll event like this: buttons[33], buttons[34], buttons[35], buttons[36], buttons[37], buttons[38], buttons[39], buttons[40] = com.GetHidButtons(dev, CurrentData) I get a value only in the first two locations: buttons[33] = 1191247872 buttons[34] = 13106 buttons[35] thru buttons[40] are empty I'm not sure how this translates into an actual button state. I've read thru the documentation and examples but couldn't find how to read buttons higher than 32. Thanks for any suggestions on how to resolve this. Update: I figured out how to update the buttons during the polling function above: I used the example HidDemo.lua script in the examples folder. Basically, we need to let FSUIPC know what something changed via this function: ipc.writeUD(0x3340 + ((i-1) * 4), buttons[34]). Then the event will register with FSUIPC and can be used to program the "virtual" button. Edited December 21, 2020 by Cool Dan Luke
Juxpax Posted December 27, 2020 Report Posted December 27, 2020 (edited) I would love to re-program my Honeycomb Alpha yoke with FSUIPC, but unfortunately it has more than 32 DirectInput buttons. Are you able to share the step-by-step details of the LUA trick? edit: nevermind, I figured it out by following few other threads I found Edited December 28, 2020 by Juxpax
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