SOLVED Left stick problem in JInput

I started messing around with an XBox 360 controller and for the most part it works, but I came across a little hickup. I want to use the left stick to control the player’s movement. The player can only go left or right most of the time. Here is the code I have: (When the stick is not being used it is centered, at 50 percent).

if(joystick.getXAxisPercentage() < 40)
player.moveLeft();
if(joystick.getXAxisPercentage() > 60)
player.moveRight();

This works well, but only when the stick is seemingly centered on the YAxis (50 percent). As soon as you veer off on the center of the Y Axis a little bit, the player stops moving, even if the XAxisPercentage is over 60. I tried adding checks for the Y Axis as well, but it did the same thing. Shouldn’t the player keep moving even if the Y Axis isnt centered, or am I missing something?

I think I figured it out, but I can’t test it until I get home.

You need to actually print the values you got there. If they are what you expected when it gets to the function, then all is well and… you need to do probably 55 and 65…?