Skip to content

Commit

Permalink
commands
Browse files Browse the repository at this point in the history
  • Loading branch information
siyoyoCode committed Feb 2, 2024
1 parent c9638d3 commit 71418ac
Showing 1 changed file with 25 additions and 3 deletions.
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;
}
}

0 comments on commit 71418ac

Please sign in to comment.