Jump to content

Using Encoders in DCS, how to set button press delay time?


Recommended Posts

so i built a button box with rotary encoders using the leo bodnar bu0836 board.

 

also another one box with encoders using the arduino pro micro..

 

i have an issue in DCS where using a rotary encoder, turning the knobs send too much input..

i mapped the rotary to things like NS430 pr UHF panels on the A10C..

 

and using the rotaries, it gets frustrating to dail in in game cockpit numerical values because the rotary sends too much input and it overshoots the desired cockpit setting..

 

making setting frequencies tough to set..

 

im just wondering if there are lua files that determine the length of time that DCS responds to joystick input...

 

appreciate any info...

find me on steam! username: Hannibal_A101A

http://steamcommunity.com/profiles/76561197969447179

Link to comment
Share on other sites

I ran into the NS430 issues as well and was contemplating approaching the problem from the other end. I don't know how you made your Arduino box, but if you use the joystick library to convert it into a Game Controller, you can make the button presses as short as you want. You control how you translate the physical button/encoder input to game controller button output after all. Maybe this way you can get around the DCS limitations?

 

I never got around to doing that, but I'm thinking of making an encoder box (mostly for CRS/HDG knobs and radios) and if I do, I'll let you know.

 

Ideally, DCS should offer a "one button click translates to one encoder click in the game" mapping. This way we wouldn't have this problem to begin with. But such is life.

Link to comment
Share on other sites

Ok, this peaked my interest enough to do some tests.

 

Here's the code I used:

 

#include <Joystick.h>

Joystick_ Joystick;

void setup() {
 Joystick.begin();
}

void loop() {
 Joystick.setButton(0, 1);
 delay(10);
 Joystick.setButton(0, 0);
 delay(1000);
}

 

This simulates a 10 millisecond long click of a button every 1 second. I settled for this to prevent any possible button/encoder bouncing from interfering with the test results and to generally keep it as simple as possible. I bound the button to the NS430 small right rotary (the one responsible for changing pages in a group), experimented with the button press duration and found that at 10ms I can get it to switch pages accurately most of the time, but sometimes it skips one page. At 5ms, it also switches pages accurately, but sometimes a click doesn't register. So the ideal duration is somewhere between 5 and 10ms I guess?

 

And of course different rotaries in game have different sweet spots. The F-5E course knob was fine with a 20ms button press... bottom line is, we really need encoder friendly bindings for this to work well.

Link to comment
Share on other sites

I am using a Leo Bodnar BU0836 controller board.

 

i can program a pulse width of 8ms and more.. i guess that is the same as the delay time.

8ms was the best i can get, but still it skips in many instances of rotating..

 

If anyone is using a BU0836A and have experience for ideal settings using the encoder configuration utilize, i like to hear about your settings.

 

 

And of course different rotaries in game have different sweet spots. The F-5E course knob was fine with a 20ms button press... bottom line is, we really need encoder friendly bindings for this to work well.

 

Thank you for experimenting with arduino code.

I Agree. i was hoping there was a .lua file that determines the response for button presses for each aircraft in DCS


Edited by hannibal

find me on steam! username: Hannibal_A101A

http://steamcommunity.com/profiles/76561197969447179

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...