Jump to content

HSI Heading and course as axes


Recommended Posts

Hi All,

 

I'm planning to build additional button boxes as a company to my Warthog HOTAS. I wanted to have HSI course and heading knobs controlled as axes swith either a potentiometer or encoder) but it seems that those controls are only available as push buttons. AFAIK this is realistic since in reality there seems to be rotary and momentary switches for that controls. As compared to BMS you can control those knobs as axes. Is it possible in DCS as well? If not directly, can something be done with LUA script? Am I missing something?

Link to comment
Share on other sites

Hi.

Go for rotary encoders. No point using pots (despite BMS can, it has little sense). I have them as encoders and they work like a charm. Very intuitive and friendly. If no rotary, look for spring loaded back to center switches or levers.

Saludos.

Saca111

Just now, Sacarino111 said:

Hi.

Go for rotary encoders. No point using pots (despite BMS can, it has little sense). I have them as encoders and they work like a charm. Very intuitive and friendly. If no rotary, look for spring loaded back to center switches or levers.

Saludos.

Saca111

in deed, for BMS I use the same button box with rotarys, so you can use it for both games.

Cheers.

Saca111

Link to comment
Share on other sites

Thanks, that's my plan. I've done some tests yesterday and it already works. I'm using arduino leonardo (or rather some clone) that serves as USB joystick device. After some tests it seems that for that joystick to register putton push, I need to make it emulate a button press for at least 30-40ms. That's generally fine but the result is that the course change is kind of slow (1/delay changes per second) even compared to clicking with a mouse, 360 degrees change costs me 20 seconds of turning 🙂.

 

So I'm thinking of writing a simple alrogithm that when I only rotate encoder one click left or right, then the joystick will send a single depress action but when I keep rotating then it'll emulate the button pressed continously, making the course change much faster.

 

Did you have similar problem, or you're using different approach?

 

 

Link to comment
Share on other sites

I implemented this trivial algorithm and it works very well. Now it's time to get to work.

 

Anyone has experience with such button boxes? I'm not quite ready to build a pit but I was planning to get two enclosures of such type (https://www.reichelt.com/pl/pl/obudowa-aluminiowa-222-x-146-x-55-aluminium-rnd-455-00421-p193635.html?CCOUNTRY=470&LANGUAGE=pl&&r=1), they quite match in size with the throttle, and place one along with TM warthog throttle and the other near the stick and use as many switches and knobs on both to have as much control in them, paint in black and voila.

Link to comment
Share on other sites

On 1/7/2021 at 5:11 PM, prelektr said:

Thanks, that's my plan. I've done some tests yesterday and it already works. I'm using arduino leonardo (or rather some clone) that serves as USB joystick device. After some tests it seems that for that joystick to register putton push, I need to make it emulate a button press for at least 30-40ms. That's generally fine but the result is that the course change is kind of slow (1/delay changes per second) even compared to clicking with a mouse, 360 degrees change costs me 20 seconds of turning 🙂.

 

So I'm thinking of writing a simple alrogithm that when I only rotate encoder one click left or right, then the joystick will send a single depress action but when I keep rotating then it'll emulate the button pressed continously, making the course change much faster.

 

Did you have similar problem, or you're using different approach?

 

 

Hi.

Yes, I have the same kind of issue... If I turn the rotary too fast it will miss inputs, so the trick is to "do it slowly"😏. I use an Arduino Mega; boy, 256 buttons at once, with up to 8 axis, plus more I/O and axis to play with to move up/down instruments brightness and similar, Gloriouse! 

I use the "out of the box" aproach that Overpro uses in the thread I linked you to.

On 1/7/2021 at 10:11 PM, prelektr said:

I implemented this trivial algorithm and it works very well. Now it's time to get to work.

 

Anyone has experience with such button boxes? I'm not quite ready to build a pit but I was planning to get two enclosures of such type (https://www.reichelt.com/pl/pl/obudowa-aluminiowa-222-x-146-x-55-aluminium-rnd-455-00421-p193635.html?CCOUNTRY=470&LANGUAGE=pl&&r=1), they quite match in size with the throttle, and place one along with TM warthog throttle and the other near the stick and use as many switches and knobs on both to have as much control in them, paint in black and voila.

I do the actual boxes myself, with "dolartree"(???) foam board (black one). Not the most robust, but sturdy enough to do the prototyping and tests. My plan is to 3D print the boxes acording to my room possibilitys (I mean what my wife accepts!)

Cheers.

Saca111

Link to comment
Share on other sites

On 1/7/2021 at 11:11 AM, prelektr said:

So I'm thinking of writing a simple alrogithm that when I only rotate encoder one click left or right, then the joystick will send a single depress action but when I keep rotating then it'll emulate the button pressed continously, making the course change much faster.

One thing to remember if you do this, is that if you press and hold for more than about a second (I can't remember exactly how long) it will then allow you to input the desired heading on the UFC.  I can't remember if it keeps turning (incrementing or decrementing the heading) once that happens, but if it doesn't then you're not going to gain anything.

Link to comment
Share on other sites

On 1/9/2021 at 1:23 PM, Sacarino111 said:

Hi.

Yes, I have the same kind of issue... If I turn the rotary too fast it will miss inputs, so the trick is to "do it slowly"😏. I use an Arduino Mega; boy, 256 buttons at once, with up to 8 axis, plus more I/O and axis to play with to move up/down instruments brightness and similar, Gloriouse! 

I use the "out of the box" aproach that Overpro uses in the thread I linked you to.

I do the actual boxes myself, with "dolartree"(???) foam board (black one). Not the most robust, but sturdy enough to do the prototyping and tests. My plan is to 3D print the boxes acording to my room possibilitys (I mean what my wife accepts!)

Cheers.

Saca111

 

I experienced the same but this can be fixed easily in Arduino software. Which library do you use? I remember, once I used regular Arduino Uno as HID device but then I switched to Leonardo which have hardware USB support, however I'm not sure if it is any better since you can do similar things with regular Arduino.

 

BTW. I can post a code snippet that hopefully would fix the issue for you as well. Simply it emulates that the button is pressed when you keep rotating (even fast) but emulates just one press if you rotate the dial slowly.

 

On 1/9/2021 at 5:50 PM, rob10 said:

One thing to remember if you do this, is that if you press and hold for more than about a second (I can't remember exactly how long) it will then allow you to input the desired heading on the UFC.  I can't remember if it keeps turning (incrementing or decrementing the heading) once that happens, but if it doesn't then you're not going to gain anything.

Thanks! I was not aware of that. Is it documented and working in DCS F16? So I'm assuming the real knob is a "semi" rotary switch that is actually just a 3 position switch but it is shaped as a dial correct? What is the function of the pushbutton of that dials (CRS and HDG). Does anyone has a source to buy such switches that would work well (and would not ruin the wallet :))?

Link to comment
Share on other sites

1 hour ago, prelektr said:

 

I experienced the same but this can be fixed easily in Arduino software. Which library do you use? I remember, once I used regular Arduino Uno as HID device but then I switched to Leonardo which have hardware USB support, however I'm not sure if it is any better since you can do similar things with regular Arduino.

 

BTW. I can post a code snippet that hopefully would fix the issue for you as well. Simply it emulates that the button is pressed when you keep rotating (even fast) but emulates just one press if you rotate the dial slowly.

 

Thanks! I was not aware of that. Is it documented and working in DCS F16? So I'm assuming the real knob is a "semi" rotary switch that is actually just a 3 position switch but it is shaped as a dial correct? What is the function of the pushbutton of that dials (CRS and HDG). Does anyone has a source to buy such switches that would work well (and would not ruin the wallet :))?

Hi.

I use an Arduino mega, with the sketch already writen, and due to my expertise (joking) in programing, I touch little to nothing in it. Go check the link I posted and you will understand. Thanks again, no need for that code, thanks.

Saca111

Link to comment
Share on other sites

On 1/11/2021 at 4:07 AM, prelektr said:

Thanks! I was not aware of that. Is it documented and working in DCS F16? So I'm assuming the real knob is a "semi" rotary switch that is actually just a 3 position switch but it is shaped as a dial correct? What is the function of the pushbutton of that dials (CRS and HDG). Does anyone has a source to buy such switches that would work well (and would not ruin the wallet :))?

The F18 HDG and CRS selectors are momentary 3 position switches (not knobs) on the top of the AMPCD.  If you hold it to one side or the other for a couple of moments it allows entry on the UFC AND (just checked this) it does keep incrementing or decrementing as long as you hold it.  So in theory your original plan should work.

Can't help on the F16 as I don't have it.


Edited by rob10
Corrected post
Link to comment
Share on other sites

  • Recently Browsing   0 members

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