public class CubedArcadeDrive
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 |
|---|
CubedArcadeDrive()
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()
Read the move stick value and return the cube of this value.
|
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, willRunWhenDisabledprotected Drive m_drive
protected edu.wpi.first.wpilibj.Joystick m_joystick
public CubedArcadeDrive()
protected void initialize()
initialize in class edu.wpi.first.wpilibj.command.Commandprotected void execute()
execute in class edu.wpi.first.wpilibj.command.Commandprivate double getRotateStickValue()
private double getMoveStickValue()
protected boolean isFinished()
isFinished in class edu.wpi.first.wpilibj.command.Commandprotected void end()
end in class edu.wpi.first.wpilibj.command.Commandprotected void interrupted()
interrupted in class edu.wpi.first.wpilibj.command.Command