Skip to content

Commit

Permalink
armAtSetpoint()
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonS09 committed Mar 3, 2024
1 parent 8fe76e7 commit 8ff445e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/carlmontrobotics/subsystems/Arm.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ public TrapezoidProfile.State getCurrentArmGoal() {


public boolean armAtSetpoint() {
return armProfile.isFinished(armProfileTimer.get());
return Math.abs(getArmPos() - goalState.position) < POS_TOLERANCE_RAD &&
Math.abs(getArmVel() - goalState.velocity) < VEL_TOLERANCE_RAD_P_SEC;
}


Expand Down

0 comments on commit 8ff445e

Please sign in to comment.