Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

GameControlPlus - centering joystick?

$
0
0

This is in Processing 3.02, Latest GCP library, Win 7.

Having a bit of a prob getting the Logitech Extreme 3D to zero to the center of my sketch. Here is the line where I read an axis:

JOYX = map(stick.getSlider("X").getValue(), -1, 1, 0, radarDia);

radarDia is a constant that defines the size/diameter of the circle/ellipse that is drawn as the center of a radar screen.

When viewing the stick in Configurator, and the joystick at it's "idle" zero-position, the Y axis shows -0.05250628 and the X axis shows 0.0058442354. I'm assuming this is the value, R or E from the joystick pots. Can the multiplier and tolerance fields in Configurator be used to manually 'tune' the stick to get a decent zero reading - or should this be done in the Processing map() function?

I have a println right at the stick read function, and at the idle/zero position it is returning X:452.6299 Y: 450.006 - with a bit of jitter which I'd also like to smooth out.


Viewing all articles
Browse latest Browse all 2896

Trending Articles