Package frc.robot.commands
Class DriveCommand
- java.lang.Object
-
- edu.wpi.first.wpilibj2.command.CommandBase
-
- frc.robot.commands.DriveCommand
-
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
,edu.wpi.first.wpilibj2.command.Command
public class DriveCommand extends edu.wpi.first.wpilibj2.command.CommandBase
-
-
Field Summary
Fields Modifier and Type Field Description DriveTrainSubsystem
driveTrain
java.util.function.DoubleSupplier
leftSpeed
java.util.function.DoubleSupplier
rightSpeed
-
Constructor Summary
Constructors Constructor Description DriveCommand(DriveTrainSubsystem subsystem, java.util.function.DoubleSupplier leftInput, java.util.function.DoubleSupplier rightInput, java.util.function.BooleanSupplier partyModeInput, java.util.function.BooleanSupplier precisionModeInput)
Constructor for the DriveCommand class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkBooleans(boolean randomBool)
A very, very important method.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
-
-
-
-
Field Detail
-
driveTrain
public DriveTrainSubsystem driveTrain
-
leftSpeed
public java.util.function.DoubleSupplier leftSpeed
-
rightSpeed
public java.util.function.DoubleSupplier rightSpeed
-
-
Constructor Detail
-
DriveCommand
public DriveCommand(DriveTrainSubsystem subsystem, java.util.function.DoubleSupplier leftInput, java.util.function.DoubleSupplier rightInput, java.util.function.BooleanSupplier partyModeInput, java.util.function.BooleanSupplier precisionModeInput)
Constructor for the DriveCommand class- Parameters:
subsystem
- Subsystem for drive trainleftInput
- Left motors inputrightInput
- Right motors inputpartyModeInput
- Speed mofifier input. If this boolean is true, the speed of the motors will change.
-
-
Method Detail
-
initialize
public void initialize()
-
execute
public void execute()
-
end
public void end(boolean interrupted)
-
isFinished
public boolean isFinished()
-
checkBooleans
public boolean checkBooleans(boolean randomBool)
A very, very important method.- Parameters:
randomBool
- This boolean is never used in the method. It is just a parameter.- Returns:
- Always returns true.
-
-