Joystick Lag

My team has been running some tests and have noticed our joysticks have been majorly lagging from the motion of the joystick to the motion of the robot. There is a delay of about 45 seconds between the time the joystick is moved and the time that the robot reacts to the motion. The Joystick we are using is a Logitech Extreme 3d pro. We are unsure of what we should do to fix this.
Thank you in advance.

That’s probably going to be a code problem.

You can post your code and ask for a review.

Yeah, it is most definitely a problem with the code. Honestly any delay over a two seconds is 99% because of the code. Please post your code here so we can help!

public class DriveTrain extends Subsystem {
private Talon leftTalon;
private Talon rightTalon;

// Put methods for controlling this subsystem
// here. Call these from Commands.
public DriveTrain() {
	rightTalon = new Talon(RobotMap.rightTalonPort);
	leftTalon = new Talon(RobotMap.leftTalonPort);
	
}
public void drive(Joystick stick) {
	double x = stick.getX();
	double y = stick.getY();
	
	leftTalon.set(x+y);
	rightTalon.set(x-y);
}
public void initDefaultCommand() {
    // Set the default command for a subsystem here.
    //setDefaultCommand(new MySpecialCommand());
setDefaultCommand(new DriveWithJoystick());
}

}

Potentially it can depends on how many things you have connected that require bandwidth. Examples include: Streaming camera feeds, or sending back data that doesn’t pertain to driver controls. There could also be some sort of issue with either Firewalls or antivirus software on the actual computer. But the code looks ok to me.