Skip to content

Commit

Permalink
James broke the arm zero again
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsDaWither committed Oct 13, 2023
1 parent c185274 commit 26c64a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/frc/robot/subsystems/ArmSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public ArmSubsystem() {


extendEncoder.setPositionConversionFactor(extendMetersPerTick);
absoluteAngleEncoder.setPositionOffset(0.382);
absoluteAngleEncoder.setPositionOffset(0.044);
relativeAngleEncoder.setDistancePerPulse(2 * Math.PI / 8192.0);

pidExtend.setSetpoint(0);
Expand Down Expand Up @@ -186,7 +186,8 @@ public void angleUp() {
}

public double getAnglePosition() {
return (absoluteAngleEncoder.getAbsolutePosition() - absoluteAngleEncoder.getPositionOffset()) * Math.PI * 2;
double angle = (absoluteAngleEncoder.getAbsolutePosition() - absoluteAngleEncoder.getPositionOffset()) * Math.PI * 2;
return (angle > 4) ? angle - (Math.PI * 2) : angle;
}

public void angleDown() {
Expand Down

0 comments on commit 26c64a4

Please sign in to comment.