Package frc.robot.commands
Class DriveCommands.TurnDegrees
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.robot.commands.DriveCommands.TurnDegrees
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
- Enclosing class:
DriveCommands
public static class DriveCommands.TurnDegrees
extends edu.wpi.first.wpilibj2.command.Command
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior
-
Field Summary
Fields inherited from class edu.wpi.first.wpilibj2.command.Command
m_requirements
-
Constructor Summary
-
Method Summary
Methods inherited from class edu.wpi.first.wpilibj2.command.Command
addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineWith, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, initSendable, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, runsWhenDisabled, schedule, setName, setSubsystem, unless, until, withInterruptBehavior, withName, withTimeout
-
Constructor Details
-
TurnDegrees
public TurnDegrees(double speed, double degrees) Creates a new TurnDegrees. This command will turn your robot for a desired rotation (in degrees) and rotational speed.- Parameters:
speed
- The speed which the robot will drive. Negative is in reverse.degrees
- Degrees to turn. Leverages encoders to compare distance.
-
-
Method Details
-
initialize
public void initialize()- Overrides:
initialize
in classedu.wpi.first.wpilibj2.command.Command
-
execute
public void execute()- Overrides:
execute
in classedu.wpi.first.wpilibj2.command.Command
-
end
public void end(boolean interrupted) - Overrides:
end
in classedu.wpi.first.wpilibj2.command.Command
-
isFinished
public boolean isFinished()- Overrides:
isFinished
in classedu.wpi.first.wpilibj2.command.Command
-