public class LinearArcadeDrive
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 |
---|
LinearArcadeDrive()
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 forward/backward movement and the other being left/right
turning.
|
private double |
getMoveStickValue() |
private double |
getRotateStickValue()
Read the rotation stick value and return the cube of this 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 LinearArcadeDrive()
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 getRotateStickValue()
private double getMoveStickValue()
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