Package frc.robot.commands
Class Turn
java.lang.Object
edu.wpi.first.wpilibj2.command.CommandBase
frc.robot.commands.Turn
- All Implemented Interfaces:
edu.wpi.first.wpilibj.Sendable,edu.wpi.first.wpilibj2.command.Command
public class Turn
extends edu.wpi.first.wpilibj2.command.CommandBase
Turns the bot a set number of degrees.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Turn(double Degrees, double Speed)Turns the bot a set number of degrees. -
Method Summary
Modifier and Type Method Description voidend(boolean interrupted)voidexecute()voidinitialize()booleanisFinished()Methods inherited from class edu.wpi.first.wpilibj2.command.CommandBase
addRequirements, getName, getRequirements, getSubsystem, initSendable, setName, setSubsystem, withNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Turn
public Turn(double Degrees, double Speed)Turns the bot a set number of degrees.- Parameters:
Degrees- The number of degrees to turn - negative to the left, positive to the right.Speed- The speed at which to turn (0 to 1). Speeds over x are not recommended for maximal accuracy.
-
-
Method Details
-
initialize
public void initialize() -
execute
public void execute() -
isFinished
public boolean isFinished() -
end
public void end(boolean interrupted)
-