From 63f2ac14bdfc4193d3a3e9cac476f2e988d9117e Mon Sep 17 00:00:00 2001 From: nathanrsxtn Date: Thu, 7 Mar 2019 16:49:55 -0700 Subject: [PATCH] Create DriveSetAngle.java Has an error: The method turnToAngle(double, double, double, MPSoftwarePIDController.MPSoftwareTurnType) is undefined for the type DriveSetAngleJava(67108964) --- .../frc4388/robot/commands/DriveSetAngle.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 2019robot/src/main/java/org/usfirst/frc4388/robot/commands/DriveSetAngle.java 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; + } +}