Forums » Community Projects

AnalogToDigital

Jul 28, 2013 Pizzasgood link
http://www.voupr.com/plugin.php?name=analogtodigital

Allows you to bind joystick axes to commands that normally require digital controls (e.g. +Shoot1, +Turbo, etc.)

/a2d help
/a2d clear <js> <axis>
/a2d clear_all
/a2d print
/a2d set <js> <axis> <high threshold> <high command> <low threshold> <low command>

Example: /a2d set 0 4 500 +Shoot1 -500 +Shoot2

The thresholds range from +/- 1000.

You can disable either command by setting it to an empty string, or by setting the threshold to a number outside of the +/- 1000 range.
Jul 29, 2013 yodaofborg link
Pretty fly plugin.
Jul 29, 2013 abortretryfail link
This... is AWESOME.

I threw together a hack once to do this, but never made it into a real usable plugin. Very cool. :D

Why it's not part of the default control configuration, I'll never understand...
Aug 08, 2013 abortretryfail link
Is there any way to get it to toggle off +zoom when you zero out the axis? For example:

/a2d set 0 4 500 targetfromt -500 +zoom

If you press the hat to zoom, it doesn't unzoom until you press and release the key (usually 'i') bound to +zoom
Aug 08, 2013 Pizzasgood link
It was supposed to be doing that already. I'll look into it this afternoon.
Aug 08, 2013 Pizzasgood link
Version 1.2 now available. See link first post.

It turns out that +turbo and +shoot[1-3] are abnormal. They are canceled by running the same command with '0' as the first parameter, e.g. "+turbo 0". The other movement commands also work that way, but can't be used through a plugin so they're irrelevant. The rest of the +commands, like +zoom, +ptt, +cfire1, etc. are canceled by changing the + to a -, e.g. "-zoom".

So, now the code has special cases for +turbo and +shoot[1-3], and for everything else it just swaps the + for a -.
Nov 21, 2013 davidshutter link
Do you think it could it be possible to stack commands on the same axis?
I've got a stick with a throttle lever, which isn't really suited to VO, but with a2d I can set a high and low threshold so that the throttle binds to accelerate and decelerate reliably on both f/a and physics mode.

what would be nice though, would be to set saturation points, so that on an axis from -1000 - +1000, at +500 accelerate is activated, and then at +800 the turbo kicks in. The same could be used with brakes and decelerate/reverse on the -ve axis?

I know it's a pretty specific issue, but is it something that could work?
Nov 21, 2013 Pizzasgood link
If you're asking whether it's doable, yes, definitely. If you're asking whether I will do it, well, probably not unless you offer me some kind of motivation (10M credits, or a few hundred gauss mkIII, or new glasses, whatever).

You could try doing it yourself. The best way to learn to program is by working on projects that are immediately useful to you.