Jump to content

Custom Axis + Joystick == Pointless


Recommended Posts

Dear KSP,

And please forgive me if I got the wrong end of the stick here, because this certainly seems like at minimum a glaring oversight if not a bug outright.

I got now a warthog throttle, ch throttle and vkb flightstick.

I got enough axes now that I want to assign 3 of the custom axes to a physical axis.  So I go and do so.

Now when I try and use the axis it is some kind of weird "relative" movement. 

The axis is greater than the zero point, the set point increases, less than it it decreases, there is no 1:1 mapping between the physical axis position(on the joystick) and the axis position(in the game).

It is like "IF joystick_axis > 0.0 THEN custom_axis += something ELSE custom_axis -= something", NOT as it aught to be "custom_axis = joystick_axis".  I notice that there are keys that can be bound to increment and decrement these axes also, maybe wires are crossed somewhere ?

Surely this has got to be an oversight and not the intended behaviour ?  What is the point of mapping them to a physical axis at all if it is ?

IF it is intended behaviour then there really aught to be an options somewhere to switch between relative and absolute mode.  Maybe this has just not come up as a problem yet as many ppl dont have a lot of flight controllers lying around.

OR I am just an idiot and have missed some obvious switch in the configuration somewhere, but I did look through all the options both on the menus and in the settings.cfg file.

SOLUTION : There is a tiny button under the Custom1->4 axis in the VAB/SPH action groups page, NOT the settings from main menu like all the other control configurations are.  This is actually better as anything that gives more control and flexibility and I am all for anything that does that.

Gavin786

Edited by Gavin786
Link to comment
Share on other sites

you can use controllers to remap the input to output via curves. also be sure to set the axis as absolute when you assign a function to an axis. 

one thing i noticed is that the default sensitivity results in nonlinearity.  i knocked it down to 0.5 and it works a lot better but is still nonlinear. not sure how the math there works but if someone knows what setting results in a linear joystick motion that would be great, if i need anything other than linear i could always use a controller. perhaps new default settings are in order, at least for the 4 custom axes. my personal preference would be linear with no dead zone, if i need something else i can just add a controller to my space craft, which is better than having to exit to the main menu to change my axis settings. 

Edited by Nuke
Link to comment
Share on other sites

Are you sure you can do this with the 4 new custom axis ?

What would the settings.cfg file look like for that ?  I did try to find a way to set to absolute and didnt see anything.  As I said before I looked through whole UI plus the cfg file and just couldnt find this option.

I use joystick gremlin to do all the curves etc I want but didnt know KSP could do it also.  All I saw was dead zones there.

It would be good if there was some documentation for all of this.

Just re-read your post and "Sensitivity" is a power curve.  Didnt know that.  Its important to get documentation for that and the right value to get it 1:1 as most folks I guess would prefer to use likes of joystick gremlin or their joystick software for curves.

Edited by Gavin786
Link to comment
Share on other sites

im not quite sure whats in my cfg. i just went into the settings where you bind those and set the dead zone to zero and the sensitivity to 0.5.

also make sure you are using 1.7.2, as i found 1.7.1 a tad glitchy though it could have just been that i wasn't over the learning curve yet. 

 

e:

after some tests i found that the default setting is in fact linear.

though there seems to be some glitches. like its only registering the top half of my axis. anything below the midpoint just seems to be ignored. if i go to the other extreme it does this wrap around thing thats rather annoying. of course this might be the 16-bit axes im using. using a fancy delta sigma adc on an arduino nano which shows up as a hid game controller. joystick itself is an old milspec heavy equipment controller, with cast aluminum gimbals. it does not have a recenter mechanism and instead holds its position by friction and and goes through a reduction gear before going to the potentiometer. the original pots were trash and i replaced them with has custom built hall potentiometers. these sensors are linear enough through much of their range and i just made sure i set the stops to limit travel into the nonlinear zones. then i calibrated it in windows. though the hardware does work in everything else, its kind of sketchy. im kind of a control enthusiast. 

Edited by Nuke
Link to comment
Share on other sites

1 hour ago, Nuke said:

snip

I think maybe im not being clear what problem is.

Basically axis works as a weird relative axis.  There is no mapping between axis position and set value.  It is not anything to do with response curves, discussing that seems to be going of topic, we can start another thread to talk about it.

The problem is :

Above axis midpoint its equivalent to pressing the "increment axis" button on the keyboard.

Below axis midpoint its equivalent to pressing the "decrement axis" button on the keyboard.

I am pretty certain this is a bug or a glaring design error if its intentional behaviour.

For the sake of simplicity lets just assume a linear curve as its difficult to understand otherwise.

It should be :

Physical axis set to 10% it is 10% of value on game axis;

Physical axis set to 20% it is 20% of value on game axis;

Physical axis set to 30% it is 30% of value on game axis;

etc etc.

That is NOT happening, it only considers the midpoint of the axis and maps this to an increment or decrement function.

Gavin786

 

Link to comment
Share on other sites

one thing i forgort to mention i think this is a problem with the servos, i havent had such problems when im just controlling thrust limiters. i think anyway. need to push it more to the limits to see what breaks. though i dont have a whole lot of time to test it. 

e: ok i got some confirmation that the joystick axes will bind almost perfectly to a slider such as thrust limiter. the almost is because there seems to be a wrap around bug at the bottom of the axis (corresponding to the left side of the bar of the thing being controlled), like if you go to zero, the thrust will wrap around to 100% and go full. it seems to be a range mapping issue. seems to be that the input range is expected to be 0-100% when its probibly -100-100% or something like that. 

Edited by Nuke
Link to comment
Share on other sites

On 6/22/2019 at 12:14 PM, Gavin786 said:

Above axis midpoint its equivalent to pressing the "increment axis" button on the keyboard.

Below axis midpoint its equivalent to pressing the "decrement axis" button on the keyboard.

There is an ability to change from incremental to absolute in the axis groups, have you tried that?

Link to comment
Share on other sites

5 minutes ago, KerikBalm said:

There is an ability to change from incremental to absolute in the axis groups, have you tried that?

I have searched high and low for a setting like that.  Through the settings.cfg file with fine tooth comb.

Where is it ?

Link to comment
Share on other sites

2 hours ago, Gavin786 said:

There is an ability to change from incremental to absolute in the axis groups, have you tried that?

I actually just found the control.  It is on the Custom1 axis itself.  It is a tiny graphical checkbox below the control.  Very easy to miss!

Thank you KerikBalm.  I have been looking for a way to do this for days.

Even made a video asking for help.

That is going to be super useful in my builds.

Gavin786

Link to comment
Share on other sites

i think the problem i was having is that my arduino library uses signed axes. and the game expects unsigned axes. oddly its supported by windows as the numbers i get when i calibrate center at zero rather than half way up the range. im sure if i tweak my hid descriptors i could fix it. i wanted to go in and support other bit depths anyway, arduinos support 10 bit out the box. i think the due has 12-bit and that works with the library. i mostly wanted to play with a new 16 bit delta-sigma adc breakout board, and its signed in 16 bit mode. people rave about the teensy but why spend $20 when you can get 32u4 pro micros for $3.

Edited by Nuke
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...