diff --git a/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/DriveSetAngle.java b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/DriveSetAngle.java new file mode 100644 index 0000000..2b4db9a --- /dev/null +++ b/2019robot/src/main/java/org/usfirst/frc4388/robot/commands/DriveSetAngle.java @@ -0,0 +1,24 @@ +package org.usfirst.frc4388.robot.commands; + +import org.usfirst.frc4388.robot.Robot; + +import edu.wpi.first.wpilibj.command.Command; + +import org.usfirst.frc4388.utility.MPSoftwarePIDController.MPSoftwareTurnType; + +public class DriveSetAngle extends Command { + + private double targetAngle; + private double maxError; + private double maxPrevError; + private MPSoftwareTurnType turnType; + // Called just before this Command runs the first time + protected void initialize() { + turnToAngle(targetAngle, maxError, maxPrevError, turnType); + } + + // Make this return true when this Command no longer needs to run execute() + protected boolean isFinished() { + return true; + } +}