Package frc.robot.commands
Class DriveCommands
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.robot.commands.DriveCommands
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
public class DriveCommands
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
ConstructorsConstructorDescriptionDriveCommands
(SwerveSubsystem swerveSubsystem, DoubleSupplier forward, DoubleSupplier sideways, DoubleSupplier radians, boolean fieldRelative, boolean limited) This class contains all the drive commands for swerve -
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, initialize, initSendable, isFinished, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, runsWhenDisabled, schedule, setName, setSubsystem, unless, until, withInterruptBehavior, withName, withTimeout
-
Constructor Details
-
DriveCommands
public DriveCommands(SwerveSubsystem swerveSubsystem, DoubleSupplier forward, DoubleSupplier sideways, DoubleSupplier radians, boolean fieldRelative, boolean limited) This class contains all the drive commands for swerve- Parameters:
swerveSubsystem
- SwerveSubsystem instance for controlling the swerve driveforward
- The target forward meters/secondsideways
- The target sideways meters/secondradians
- The target radian for the rotationfieldRelative
- If the swerve should be relative to the robot or the fieldlimited
- If we are limiting the motors
-
-
Method Details
-
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
-