This is our team's custom mecanum code:
Code:
jaguarDrive((jX+jY)/2, (jY-jX)/2, -(jY-jX)/2, -(jX+jY)/2);
jX and jY are just the X and Y coordinates our joysticks read (-1 through 1).
And the jaguarDrive method:
Code:
public void jaguarDrive(double FL, double RL, double FR, double RR)
{
m_frontLeftMotor.set(FL);
m_rearLeftMotor.set(RL);
m_frontRightMotor.set(FR);
m_rearRightMotor.set(RR);
}
This is by far the simplest solution I've seen.