Help with Mecanum Code

Greeting, I am this year’s programmer for the team I am part of and I am having some problems with the mecanum code. Could someone please help me out with the code or tell me the axis and button mapping for the Logitech Attack 3? The team wishes to use to Logitech Attack 3 joysticks to control the robot’s movement. The first one to control the robot to move forward, back and sideways and the second joystick to make the robot rotate. The problem so far is the the joysticks move the robot in an undesired manner. By this I mean that the first joystick only controls if moved sideways and it causes the robot to rotate and the other joystick makes the robot try to move sideways activating only two motors with the X axis and rotate with moving the joystick forward only. Here is the mecanum code:
SpeedController frontLeftMotor =new Jaguar(1),
rearLeftMotor = new Jaguar (2),
frontRightMotor = new Jaguar (3),
rearRightMotor = new Jaguar (4);

RobotDrive drive=new RobotDrive(frontLeftMotor, rearLeftMotor, frontRightMotor, rearRightMotor);
Joystick leftStick=new Joystick(1);
Joystick rightStick=new Joystick(2);
drive.mecanumDrive_Cartesian(leftStick.getMagnitude(), leftStick.getDirectionDegrees(), rightStick.getX(),0);

The only code I have gotten to work is with a Xbox 360 controller, but the team doesn’t want to use an Xbox controller and I have seen in the forums that it is not highly recommended. Just in case here is the code for that:

RobotDrive chassis= new RobotDrive(1,2,3,4);
Joystick xboxController= new Joystick(1);
chassis.mecanumDrive_Cartesian(xboxController.getRawAxis(1), xboxController.getRawAxis(4), xboxController.getRawAxis(2), 0);

Try:
drive.mecanumDrive_Cartesian(leftStick.getX(), leftStick.getY(), rightStick.getX(),0);

Our team likes to use the Logitech Extreme 3D joystick for mecanum because it’s a 3 axis joystick that has the normal X and Y movement as well as a twist capability that we use for rotating the robot instead of using a second joystick.

Good luck.

Also, you don’t need these SpeedController lines at all, just call the RobotDrive constructor class like this:
RobotDrive drive = new RobotDrive(1,2,3,4);

True, but for anyone reading this, RobotDrive instantiates those ports as Jaguars, and using Jaguar timings. It is not correct to do this if you are using Victors, even if it still works.