Package frc.robot.commands.autocommands
Class DriveForwardSeconds
- java.lang.Object
-
- edu.wpi.first.wpilibj2.command.CommandBase
-
- frc.robot.commands.autocommands.DriveForwardSeconds
-
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
,edu.wpi.first.wpilibj2.command.Command
public class DriveForwardSeconds extends edu.wpi.first.wpilibj2.command.CommandBase
-
-
Constructor Summary
Constructors Constructor Description DriveForwardSeconds(double seconds, double dir, DriveTrainSubsystem driveTrainSubsystem)
Creates DriveForwardSeconds command
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end(boolean interrupted)
void
execute()
void
initialize()
boolean
isFinished()
-
Methods inherited from class edu.wpi.first.wpilibj2.command.CommandBase
addRequirements, getName, getRequirements, getSubsystem, initSendable, setName, setSubsystem, withName
-
-
-
-
Constructor Detail
-
DriveForwardSeconds
public DriveForwardSeconds(double seconds, double dir, DriveTrainSubsystem driveTrainSubsystem)
Creates DriveForwardSeconds command- Parameters:
seconds
- The amount of time the robot should drive forwarddir
- The direction the robot should drive in. (1.0 == forward, -1.0 == backward)driveTrainSubsystem
- The drive train subsystem.
-
-