public class linearControllerOrientedDrive
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 |
|---|
linearControllerOrientedDrive()
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
|
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 |
getXStickValue()
Read the rotation stick value and return the cube of this value.
|
private double |
getYStickValue() |
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 linearControllerOrientedDrive()
protected void initialize()
initialize in class edu.wpi.first.wpilibj.command.Commandpublic void execute()
execute in class edu.wpi.first.wpilibj.command.Commandprivate double getXStickValue()
private double getYStickValue()
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