Autonomous Mecanum Drive

Hey guys, me again, I’m not entirely sure on how to set up the autonomous mecanum drive. This is what we have as of right now


public void autonomousPeriodic() {
	    	while (isAutonomous() && isEnabled()){
	    		myDrive.mecanumDrive_Cartesian(.25, .25, 1, scotbot.getAngle());
	    		

Any possible help would be greatly appreciated.

First off, you shouldn’t do this. You’re using Iterative so the autonomousPeriodic gets called over and over. If you put a while loop in it messes this up.