-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
c9638d3
commit 71418ac
Showing
1 changed file
with
25 additions
and
3 deletions.
There are no files selected for viewing
28 changes: 25 additions & 3 deletions
28
src/main/java/frc/robot/commands/shooter/pivot/ShooterPivotVerticalCommand.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 |
---|---|---|
@@ -1,5 +1,27 @@ | ||
package frc.robot.commands.shooter.pivot; | ||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.shooter.ShooterPivotSubsystem; | ||
|
||
public class ShooterPivotVerticalCommand { | ||
|
||
} | ||
public class ShooterPivotVerticalCommand extends Command{ | ||
ShooterPivotSubsystem pivotSubsystem; | ||
|
||
public ShooterPivotVerticalCommand(ShooterPivotSubsystem pivotSubsystem){ | ||
this.pivotSubsystem = pivotSubsystem; | ||
addRequirements(pivotSubsystem); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
pivotSubsystem.setAutoAimBoolean(false); | ||
pivotSubsystem.setAngle(90.0); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
if(Math.abs(pivotSubsystem.getPosition()) - 90 < pivotSubsystem.ERRORTOLERANCE){ | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
} |