Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Moderator: AdminGroup

wkwkwk
Posts: 8
Joined: Sat Feb 18, 2023 5:54
Has thanked: 1 time
Been thanked: 3 times

Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Postby wkwkwk » Sun Feb 19, 2023 22:35

Has anyone created a Joystick Gremlin Plugin to control VKB LEDs?

There is a nice plugin for Virpil controllers that could be used as a template, but the key component is an executable file "VPC_LED_Control.exe" that you pass LED information to and then it makes the changes. Is there a similar program for VKB devices?

There is a python package (pyvkb) that holds the basic modules for controlling LEDs on VKB devices. However, in the examples I've seen, you can't import packages within a JG plugin. There might be a way to integrate the necessary pyvkb modules directly into a plugin, but I think there are a number of package dependences that make this difficult.

There is a project on github that utilizes pyvkb to control VKB LEDs while playing MSFS. I think this program runs parallel to MSFS and polls for aircraft states and modifies the VKB device accordingly. The games I play are old (Mig Alley, CFS) so I don't think that information is available, even if I wanted to have a separate process running in parallel, which I don't.

Like many (some, a few?) people, I have a Gladiator NXT and a TWCS throttle. I use VKBDevCfg-C.exe to configure the LEDs and JG to integrate my stick and throttle. I like to have a LED toggle on/off for certain states, but because the LEDs are setup separately from the button mapping, the process can easily get out of sync. In addition, I would love to have the VKB rgb LED tied to throttle functions as well.

Has anyone attempted a plugin like this?

The Virpil JG plugin can be found here: https://forum.virpil.com/index.php?/topic/5832-upgrade-to-vpc_ledspy-to-be-a-lot-faster/
The pyvkb package can be found here: https://github.com/ventorvar/pyvkb
The project code using pyvkb in MSFS can be found here: https://github.com/tiberiusteng/vkb-msfs-led

I found an article on JG plugins here: https://25.wf/posts/2020-11-03-joystick-gremlin.html
Any other sources for me to explore?
Last edited by wkwkwk on Tue Apr 04, 2023 7:47, edited 2 times in total.

wkwkwk
Posts: 8
Joined: Sat Feb 18, 2023 5:54
Has thanked: 1 time
Been thanked: 3 times

Re: Joystick Gremlin Plugin to control LEDs?

Postby wkwkwk » Sun Mar 12, 2023 5:23

I wrote a JG plugin to control the 3 LEDs on a Gladiator NXT. It could work for the older Gladiators as well as the Omni throttles but I cannot test that.

The plugin with dependencies is at https://github.com/WesCov/vkb_led_jg_plugin.

Please read the README for directions and known limitations. LED states are tied to buttons within a mode and not to states within a simulator so it will not handle complex interactions of buttons, but lights blink at the touch of a button... I will try to address some of those limitations in the future.

This was a 3 week project all so I could have a flashing green light on my Gladiator when I drop my landing gear from my TWCS!

wkwkwk
Posts: 8
Joined: Sat Feb 18, 2023 5:54
Has thanked: 1 time
Been thanked: 3 times

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!!

Postby wkwkwk » Tue Apr 04, 2023 7:45

I have just finished a new version of this plugin. It creates a external file that maintains an "event stack" to keep a history of button pushes and their corresponding LED activations. This allows the LEDs to "remember" prior states as simulator/game functions are turned off. Please see the pdf file for a complete description and instructions.

https://github.com/WesCov/vkb_led_jg_plugin_db.git

User avatar
fallout9
Posts: 5180
Joined: Wed Oct 03, 2018 20:37
Has thanked: 208 times
Been thanked: 1218 times

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Postby fallout9 » Wed Apr 05, 2023 8:25

Thank you, your efforts are appreciated!

wkwkwk
Posts: 8
Joined: Sat Feb 18, 2023 5:54
Has thanked: 1 time
Been thanked: 3 times

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Postby wkwkwk » Thu Apr 06, 2023 7:53

My pleasure! Love my Gladiator and it has been a fun project.

User avatar
Victorus
Posts: 1677
Joined: Wed Sep 21, 2011 13:25
Has thanked: 374 times
Been thanked: 257 times

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Postby Victorus » Thu Apr 06, 2023 12:35

VKBdev.cfg.exe gives many features for LEDs control. Not onboard only. I use RGB WS2812. Anexample for Mamba https://disk.yandex.com/i/WjftSpbFJqAkhw.
LED gauge for DIY throttle https://disk.yandex.com/i/LBSnc99coYuHyw
LED gauge for GNX https://disk.yandex.com/i/r8gNhSkqT8mbeQ
LED indication for GF axes trimming by DIY axes of throttle https://disk.yandex.com/i/LBSnc99coYuHyw
Boolean functions for events control. A lot of input events.
LED_events.jpg

Physical, logical buttons, axes state and so on. Macro using.
It works.
Руководство пользователя по контроллерам VKB (VKB controllers User Guide) Ru&En
https://disk.yandex.ru/d/LlqiYtIrIetBOQ

wkwkwk
Posts: 8
Joined: Sat Feb 18, 2023 5:54
Has thanked: 1 time
Been thanked: 3 times

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Postby wkwkwk » Sat Apr 08, 2023 2:46

I updated the pdf to explain how use plugin for a Temporary Mode Switch action.

wkwkwk
Posts: 8
Joined: Sat Feb 18, 2023 5:54
Has thanked: 1 time
Been thanked: 3 times

Re: Joystick Gremlin Plugin to control LEDs? Yes there is!! Updated Version

Postby wkwkwk » Sat Apr 08, 2023 2:53

@Victorious Very impressive builds! I wrote the plugin to integrate my TWCS and VKB Gladiator which the VKB configuration software does not do (which makes sense that it does not and is not a complaint!)


Return to “Manuals and Howtos”

Who is online

Users browsing this forum: No registered users and 26 guests