MobiFlight / MobiFlight-Connector

MobiFlight is an open source project that allows you to create your own home cockpit for your favorite flight simulator in a flexible, affordable and extremely user-friendly way.
https://mobiflight.com
MIT License
232 stars 103 forks source link

VKB Controller LED and Encoder support #1789

Closed cbrauers closed 2 months ago

cbrauers commented 4 months ago

Is your feature request related to a problem? Please describe. As discussed on Discord, a number of users would like to control the LEDs on their VKB devices with Mobiflight. Since VKB's LED API is more complex than the generic LED API introduced for Honeycomb devices, this requires a special implementation. A VKB-specific implementation also allows interfacing directly with rotary encoders, since DirectInput modes tend to slow down the encoders a lot.

Describe the solution you'd like Introduce handling of VKB LEDs and encoders into MobiFlight.

Describe alternatives you've considered I have written a C++ tool to interface with MSFS and VKB devices before, but with HIDSharp already a part of MobiFlight, it is more effective to implement the communication from scratch with the experiences gained during its development.

Additional context I have been working on an implementation over the past few weeks, currently doing some final polishing before creating a pull request. You can find my branch (along with two companion tools) on my GitHub profile. With the modularity and customizability of VKB devices, it is not sufficient to include a handful of pre-made definitions. With just module combinations sold on the store or featured in official guides, we are already in the ballpark of about 40 different definitions, and user customization can increase that arbitrarily. I have therefore written a tool to quickly create own definitions. Currently just essentially copying and pasting blocks together without in-depth JSON awareness, but it works for combinations that are not too heavily manipulated. The second tool is a testing tool for the encoder interface. Protocol documentation from VKB is a bit sparse, but I have provided the most relevant pieces here: LEDs Protocol Encoder capabilities

Koseng commented 2 months ago

Implemented with #1792