public class CubedTankDrive
extends edu.wpi.first.wpilibj.command.Command
Modifier and Type | Field and Description |
---|---|
protected Drive |
m_drive |
protected edu.wpi.first.wpilibj.Joystick |
m_joystick |
Constructor and Description |
---|
CubedTankDrive()
Construct this command and initialize the attributes (driver controller and drive subsystem).
|
Modifier and Type | Method and Description |
---|---|
protected void |
end()
Called once after isFinished returns true
|
protected void |
execute()
drive the robot using cubed inputs of the joystick with one joystick being the left forward/backward movement and the other being the right
forward/backward movement.
|
private double |
getLeftStickValue()
Read the left joystick value and cube the value.
|
private double |
getRightStickValue()
Read the right joystick value and cube the value.
|
protected void |
initialize()
Called just before this Command runs the first time
|
protected void |
interrupted()
Called when another command which requires one or more of the same
|
protected boolean |
isFinished()
Make this return true when this Command no longer needs to run execute()
|
cancel, doesRequire, getGroup, getName, getSmartDashboardType, getTable, initTable, isCanceled, isInterruptible, isRunning, isTimedOut, requires, setInterruptible, setRunWhenDisabled, setTimeout, start, timeSinceInitialized, toString, willRunWhenDisabled
protected Drive m_drive
protected edu.wpi.first.wpilibj.Joystick m_joystick
public CubedTankDrive()
protected void initialize()
initialize
in class edu.wpi.first.wpilibj.command.Command
protected void execute()
execute
in class edu.wpi.first.wpilibj.command.Command
private double getLeftStickValue()
private double getRightStickValue()
protected boolean isFinished()
isFinished
in class edu.wpi.first.wpilibj.command.Command
protected void end()
end
in class edu.wpi.first.wpilibj.command.Command
protected void interrupted()
interrupted
in class edu.wpi.first.wpilibj.command.Command