This are the (new) Support Forums for FSUIPC and related products.

These forums replace the old support forums which have been running for 20+ years. The old forums contain a wealth of information on all FSUIPC products, and are still available (until the end of the year) for read-only here.

At the moment these new forums are quite empty – I will be updating the FAQ section and copying across the User Contributions from the old forums in the next few months.

Please note that you will need to Register and Login to post for support, and also to download attachments. You can view these forums without registering.

Support is also available via Discord. Please use the following invite link to join the FSUIPC Discord server:
                           https://discord.gg/zjwUTrxmmE

Notifications
Clear all

lua event-based fast/slow button generator for rotary switches

(@fsuipc-support)
Posts: 86
Moderator
Topic starter
 

https://raw.githubusercontent.com/bbuhlig/fsuipc-contrib/main/rotfsev.lua

The above is what I wrote to manage slow vs. fast rotation of the inc/dec and trim wheel on my Honeycomb Bravo. While not perfect, it's the best I've been able to manage so far given the apparent inability of these rotaries to detect button presses faster than ~95ms. 

This module monitors a set of rotary switches for fast vs. slow toggling based on a user provided threshold between successive button events. If the rotary is moved fast enough that consecutive button events are received within a threshold, a fast virtual button is sent and successive button events are ignored. Otherwise a slow virtual button is sent for each button event if consecutive events are not received within the threshold. If your device is "glitchy" and regularly generates spurious fast events even when turning the rotary slowly, you can tell the module to treat a configurable number of fast events received within a time period as slow events.

Each virtual button can be assigned in the .ini to send FS control commands and keypresses, such as variable rates for trim adjustments on an elevator trim wheel, ref p.25 of the Advanced User's Guide.

This module provides a generally similar concept to the Rotaries.lua approach but takes advantage of buttons that are directly detected by FSUIPC and is primarily event-based rather than poll-based. Thus it should be more efficient/performant.

Define the desired buttons according to the array passed to the init() function at the bottom of the file.

 

[Originally posted in old SimMarket support forums by Blake Buhlig]


 
Posted : November 6, 2025 3:31 pm
(@fsuipc-support)
Posts: 86
Moderator
Topic starter
 

Note when using this script, the virtual buttons will not be seen in the button assignments panel. This is because the event.offset and event.button functions are not called when the buttons assignment panel is open. Therefore, to assign to the virtual buttons, you should first assign to the physical buttons and then edit your FSUIPC7.ini to manually change the assignments to the virtual buttons (including  duplicating the physical button assignment to create two virtual button assignments and changing the control for the fast/slow movement).

For an alternative solution that uses polling and so the virtual buttons can be seen on the assignments panel, together with examples on how to assign to the virtual buttons for the different functions of the selector knob, see 

https://fsuipc.com/community/user-contributions-user-contributions/basic-honeycomb-bravo-throttle-configuration/#post-70

 

John


 
Posted : November 6, 2025 3:33 pm