Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into amp
  • Loading branch information
ProgrammingSR committed Mar 30, 2024
2 parents 1332789 + 0fd6465 commit 8788c5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/DefaultLEDCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void initialize() {
}

if (m_intakeSubsystem.getArmPosition() == IntakeConstants.kIntakeAmpScoringAngle){
if (m_intakeSubsystem.armAtSetpoint()){
if (m_intakeSubsystem.ampReady()){
rgb[0] = 0;
rgb[1] = 255;
rgb[2] = 0;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/frc/robot/subsystems/IntakeSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ public double getArmPosition() {
return m_armSetpoint;
}

public boolean ampReady(){
return ((m_armEncoder.getDistance() < IntakeConstants.kIntakeAmpScoringAngle + 1) || (m_armEncoder.getDistance() > IntakeConstants.kIntakeAmpScoringAngle - 1));
}

public boolean armAtSetpoint() {
return m_armPID.atSetpoint();
}
Expand Down

0 comments on commit 8788c5f

Please sign in to comment.