public final class Drivetrain
extends edu.wpi.first.wpilibj.command.Subsystem
| Constructor | Description |
|---|---|
Drivetrain() |
Constructs a new
Drivetrain subsystem. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
halt() |
Stops the drivetrain.
|
protected void |
initDefaultCommand() |
Sets default command to be operated off of the joystick.
|
void |
setBothSpeed(double speed) |
Sets both sides of the drivetrain to the same speed.
|
void |
setBothVelocity(double velocity) |
Sets both sides of the drivetrain to the same velocity.
|
void |
setLeftSpeed(double speed) |
Sets the left drive speed based on percent output.
|
void |
setLeftVelocity(double velocity) |
Sets the left drive speed based on encoder ticks per 100ms.
|
void |
setRightSpeed(double speed) |
Sets the right drive speed based on percent output.
|
void |
setRightVelocity(double velocity) |
Sets the right drive speed based on encoder ticks per 100ms.
|
void |
shift(HardwareStates.DrivetrainGear gear) |
Shifts the gear of the drivetrain.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, getSubsystem, setName, setName, setSubsystemprotected void initDefaultCommand()
initDefaultCommand in class edu.wpi.first.wpilibj.command.Subsystempublic void setLeftSpeed(double speed)
speed - The speed to set.public void setRightSpeed(double speed)
speed - The speed to set.public void setBothSpeed(double speed)
speed - The speed to set.public void setLeftVelocity(double velocity)
velocity - The velocity to set.public void setRightVelocity(double velocity)
velocity - The velocity to set.public void setBothVelocity(double velocity)
velocity - The velocity to set.public void halt()
public void shift(HardwareStates.DrivetrainGear gear)
gear - The gear to shift to.