HeliosVirtualCockpit / Helios

Helios Distribution
https://github.com/HeliosVirtualCockpit/Helios/wiki
GNU General Public License v3.0
199 stars 34 forks source link

enhancement request: control router ability to bind to buttons instead of rotary encoder. #350

Open 54yroldHOTMOM opened 4 years ago

54yroldHOTMOM commented 4 years ago

discussed with derammo briefly:

for those of us not yet in possession of a rotary encoder it could be useful to be able to bind the control router to 2 buttons for clockwise and anticlockwise behavior respectively.

Maybe it can even be coded in that taps can be used for fine tuning of the dial and holding the button can be used for faster turning of the dial. separate pulsing and revolution settings for "taps" and "holds" maybe even ms what counts as a tap and beyond what counts as a hold.

cheers!

Todd1215 commented 3 years ago

I'll take a stab at this and see how it goes.

derammo commented 3 years ago

this doesn't seem right. you can already bind the pulses to buttons I am pretty sure

image

the "long press of button creates a higher value" could be a separate filter object (translates press and release into a trigger that carries a proportional value) but that isn't specific to the control router and doesn't belong there

derammo commented 3 years ago

Here's what I wrote up on this while drinking coffee:

Virtual Rotary Encoder

This control is an invisible RotaryEncoder replacement

Implementation

Actions

Start Incrementing

For example, on key pressed

Stop Incrementing

For example, on key released

Pulse Increment

For example, on pulse event or one shot button press

Start Decrementing

Stop Decrementing

Pulse Decrement

Triggers

incremented

Updated with a positive number of pulses on Pulse or continuously between Start and Stop, based on clock

decremented

same as incremented, but used if pulses are negative

Configuration/PropertyNotify

Discrete Step = 1

Value in pulses to emit at Start action or Pulse action

Note: naming is based on legacy controls calling this the "Step"

Initial Pulse Velocity = 0

Initial value for Pulse Velocity, which is pulses to emit per second between Start and Stop actions

Used to initialize Pulse Velocity at Start

Pulse Acceleration = 0

Change in Pulse Velocity per second, applied to Pulse Velocity between Start and Stop actions

Pulse Acceleration Delay = 0

Number of milliseconds after Start event, during which acceleration is not applied

Maximum Pulse Velocity = 50000

Maximum value for Pulse Velocity, after which acceleration is ignored

derammo commented 3 years ago

not designed: how to properly fire changes between start and stop, but it has to do something like consult the clock because it will have to change values based on system load and therefore event rate. Use of proper priority levels seem key

Todd1215 commented 2 years ago

@54yroldHOTMOM The Helios Control-Router is already capable of working with Joystick buttons. I confirmed this today after setting up an encoder with Arduino that acts like a joystick when turning the encoder left or right or pressing the middle button. Turning presses a button on the joystick which intern can turn a rotary control in Helios via the Control Router.

In the screenshot below, Arduino Button 1 is left and Button 2 is right. Is this what you were referring to when opening this issue? If not please be a bit more descriptive in your request.

image