Jump to content
The simFlight Network Forums
jaxx

Honeycomb Alpha toggle switch mapping

Recommended Posts

Here is my solution to map all toggle switches on the Honeycomb Alpha via FSUIPC to prevent the bugs that happen when always-on switches are bound in the game itself.

Landing lights and strobes can be mapped directly to on/off, all other toggles require special handling in the lua script.

Some notes on the special handling:

  • State of a single battery can not be read. Only the master state which is 1 when at least one battery is on. This means if the switch is in the off position and at least one battery is on, switching the switch on will not switch the remaining batteries on. But after one on/off cycle the switches should be synced.
  • Alternator should work correctly, toggling only those which are not already in the new state.
  • For avionics 1+2 there are no separate controls, so 4 keyboard keys must be mapped in the sim itself for 1&2 and on&off and then the lua script will send those buttons when the switch is pressed.
  • The lights beside landing & strobes need to be set via offset. Setting them via the FS controls leads to a race condition between reading the offsets and executing the controls when switching the toggle switch very fast.
  • As half of the magneto states are out of the standard 32-button range the remaining states have to be polled via the lua script.
    But putting those and virtual buttons and then just mapping those and the real buttons to the controls does not work correctly. There will be a race condition where, when quickly switching from the virtual button part to the real button part the virtual button will be registered later putting it in the wrong position (e.g. quickly turn from "BOTH" to "R", the dial will in some cases jump back to "L", because the virtual button of "L" is registered or handled after the real button of "R"), even when polling every 1ms.
    Because of that instead of mapping directly to the pressed button I only register a magneto change and then determine which button is currently in the pressed state, starting with the real buttons to avoid the race condition.

FSUIPC7.ini (partial) AlphaToggles.lua

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, jaxx said:

Here is my solution to map all toggle switches on the Honeycomb Alpha via FSUIPC to prevent the bugs that happen when always-on switches are bound in the game itself.

It might be worth posting this on the User Contributions subforum, as a worthwhile reference. You'd need to amend the title to indicate MSFS specifically though, for clarity!

Thanks!

Pete

 

Share this post


Link to post
Share on other sites
4 hours ago, jaxx said:

State of a single battery can not be read. Only the master state which is 1 when at least one battery is on. This means if the switch is in the off position and at least one battery is on, switching the switch on will not switch the remaining batteries on. But after one on/off cycle the switches should be synced.

Yes - the same issue occurs with avionics 1/2.

4 hours ago, jaxx said:

For avionics 1+2 there are no separate controls, so 4 keyboard keys must be mapped in the sim itself for 1&2 and on&off and then the lua script will send those buttons when the switch is pressed.

For avionics, the Avionics Master Set control works, but the toggle control not. I have updated the relevant offset to use the set control (but not yet released). There is a separate post on this issue.

4 hours ago, jaxx said:

Setting them via the FS controls leads to a race condition between reading the offsets and executing the controls when switching the toggle switch very fast.

This sounds strange. I will take a look.

4 hours ago, jaxx said:

all other toggles require special handling in the lua script.

Shouldn't be necessary really. I'll take a look and see whats happening...

Thanks for the report.

John

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • 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.