Skip to content

Commit

Permalink
make work on bot
Browse files Browse the repository at this point in the history
  • Loading branch information
DriverStation3 committed Mar 24, 2023
1 parent a7a5626 commit ea9a3af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/frc/team2412/robot/subsystems/ArmSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public static class ArmConstants {

public static final float ARM_FORWARD_LIMIT = 93.8f; // motor rotations
public static final float ARM_REVERSE_LIMIT = 2;
public static final float WRIST_FORWARD_LIMIT = 72;
public static final float WRIST_FORWARD_LIMIT = 62;
public static final float WRIST_REVERSE_LIMIT = 2;
public static final float WRIST_ENCODER_OFFSET = 0.227f;
public static final float WRIST_ENCODER_OFFSET = -0.22f;

public static final double ARM_VELOCITY_TOLERANCE = 0.2;
public static final double WRIST_VELOCITY_TOLERANCE = 0.2;
Expand Down Expand Up @@ -131,9 +131,9 @@ public static enum PositionType {
double prescoringWristAngle,
double scoringWristAngle) {
this.armAngle = armAngle;
this.retractedWristAngle = retractedWristAngle + WRIST_ENCODER_OFFSET;
this.prescoringWristAngle = prescoringWristAngle + WRIST_ENCODER_OFFSET;
this.scoringWristAngle = scoringWristAngle + WRIST_ENCODER_OFFSET;
this.retractedWristAngle = retractedWristAngle;
this.prescoringWristAngle = prescoringWristAngle;
this.scoringWristAngle = scoringWristAngle;
}
}
}
Expand Down Expand Up @@ -418,7 +418,7 @@ public double getElbowPosition() {
* @return Current wrist encoder position
*/
public double getWristPosition() {
return wristEncoder.getPosition();
return Math.max(wristEncoder.getPosition() + WRIST_ENCODER_OFFSET, 0);
}

/**
Expand Down

0 comments on commit ea9a3af

Please sign in to comment.