-
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.
Merge pull request #15 from Creekside7688/elevator
Elevator
- Loading branch information
Showing
3 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
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
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
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,33 @@ | ||
package frc.robot.elevator.commands; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.elevator.Elevator; | ||
import frc.robot.constants.ElevatorConstants; | ||
|
||
public class ElevatorUp extends Command { | ||
|
||
private final Elevator elevator; | ||
|
||
public ElevatorUp(Elevator elevator) { | ||
this.elevator = elevator; | ||
addRequirements(elevator); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
elevator.setHeight(ElevatorConstants.TARGET_HEIGHT); | ||
} | ||
|
||
@Override | ||
public void execute() { | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return elevator.atGoal(); | ||
} | ||
} |