Jump to content
The simFlight Network Forums

(Solved) Detecting more than 32 toggle switches (Honeycomb Bravo)


Recommended Posts

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 by Cool Dan Luke
Link to comment
Share on other sites

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 by Juxpax
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.