If you are using the SmartDashboard, you can display the values of each axis and play around with the controller to determine which axis is altered by what. Our team has gotten mecanum wheels working on a test chassis successfully using a sidewinder joystick. We are currently in the process of implementing an XBox controller system as well. We are, however, also working with field orientation which may not be helpful for you. If you would like, here is our drive
code though it is still in the works.
After taking a quick glance at your code, you may also run into issues with strafing.
If you want to strafe to the left, you want to drive the front left forward and rear left backwards while driving the front right backwards and the back right forwards. This creates a vector in only the left direction.
You are currently, with this line:
Code:
CommandBase.mecanum.mecanumDrive(-.3, .3, -.3, .3);
driving your front left backwards and rear left forwards. This will result in your end vector heading towards the middle of your robot causing it to spin it's wheels and get nowhere.
A similar approach is required for strafing right, with the wheels driving the opposite direction of strafing left.