-
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.
- Loading branch information
Showing
4 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/java/org/team1540/robot2024/commands/TrampCommand.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,28 @@ | ||
package org.team1540.robot2024.commands; | ||
|
||
import org.team1540.robot2024.subsystems.tramp.Tramp; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
|
||
public class TrampCommand extends Command { | ||
|
||
private final Tramp tramp; | ||
|
||
public TrampCommand(Tramp tramp) { | ||
this.tramp = tramp; | ||
addRequirements(tramp); | ||
} | ||
|
||
public void getNote(Tramp tramp) { | ||
if (tramp.isBeamBreakBlocked()) { | ||
tramp.end(); | ||
} else { | ||
tramp.scoreTrampCommand(); | ||
} | ||
} | ||
|
||
public void shootTramp(Tramp tramp) { | ||
tramp.scoreTrampCommand(); | ||
} | ||
|
||
} |
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