-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added RunIntake and ReverseIntake commands
- Loading branch information
1 parent
10f26f3
commit f8eef54
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
src/org/usfirst/frc/team4737/robot/commands/ReverseIntake.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.usfirst.frc.team4737.robot.commands; | ||
|
||
import org.usfirst.frc.team4737.robot.Robot; | ||
|
||
import edu.wpi.first.wpilibj.command.Command; | ||
|
||
/** | ||
* | ||
*/ | ||
public class ReverseIntake extends Command { | ||
|
||
public ReverseIntake() { | ||
// Use requires() here to declare subsystem dependencies | ||
requires(Robot.INTAKE); | ||
} | ||
|
||
// Called just before this Command runs the first time | ||
protected void initialize() { | ||
} | ||
|
||
// Called repeatedly when this Command is scheduled to run | ||
protected void execute() { | ||
Robot.INTAKE.setSpeed(-1); | ||
} | ||
|
||
// Make this return true when this Command no longer needs to run execute() | ||
protected boolean isFinished() { | ||
return false; | ||
} | ||
|
||
// Called once after isFinished returns true | ||
protected void end() { | ||
} | ||
|
||
// Called when another command which requires one or more of the same | ||
// subsystems is scheduled to run | ||
protected void interrupted() { | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/org/usfirst/frc/team4737/robot/commands/RunIntake.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.usfirst.frc.team4737.robot.commands; | ||
|
||
import org.usfirst.frc.team4737.robot.Robot; | ||
|
||
import edu.wpi.first.wpilibj.command.Command; | ||
|
||
/** | ||
* | ||
*/ | ||
public class RunIntake extends Command { | ||
|
||
public RunIntake() { | ||
// Use requires() here to declare subsystem dependencies | ||
requires(Robot.INTAKE); | ||
} | ||
|
||
// Called just before this Command runs the first time | ||
protected void initialize() { | ||
} | ||
|
||
// Called repeatedly when this Command is scheduled to run | ||
protected void execute() { | ||
Robot.INTAKE.setSpeed(1); | ||
} | ||
|
||
// Make this return true when this Command no longer needs to run execute() | ||
protected boolean isFinished() { | ||
return false; | ||
} | ||
|
||
// Called once after isFinished returns true | ||
protected void end() { | ||
} | ||
|
||
// Called when another command which requires one or more of the same | ||
// subsystems is scheduled to run | ||
protected void interrupted() { | ||
} | ||
} |