Skip to content

Commit

Permalink
make the allowed error tolerances 0 for the grabber and telescope
Browse files Browse the repository at this point in the history
  • Loading branch information
varun7654 committed Apr 14, 2023
1 parent a39fe9e commit bf0f62a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public final class Constants {
public static final int TELESCOPING_ARM_SMART_CURRENT_LIMIT = 40;
public static final double TELESCOPING_ARM_HOME_VOLTAGE = -1.5;
public static final int TELESCOPING_ARM_CAN_ID = 60;
public static final double TELESCOPING_ARM_ALLOWED_ERROR = 0.0001;
public static final double TELESCOPING_ARM_ALLOWED_ERROR = 0.0000;
public static final ArmFeedforward GRABBER_FEEDFORWARD = new ArmFeedforward(0.32, 0.34, 0, 0);
public static final TrapezoidProfile.Constraints GRABBER_PIVOT_CONSTRAINTS
= new TrapezoidProfile.Constraints(10, 10);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/subsytem/grabber/Grabber.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public synchronized void update() {
if (DriverStation.isTest()) {
io.setPivotVoltage(Constants.GRABBER_FEEDFORWARD.calculate(Math.toRadians(inputs.pivotPosition), 0, 0));
} else {
if (Math.abs(inputs.pivotPosition - state.position) > 1) {
if (Math.abs(inputs.pivotPosition - state.position) > 0) {
io.setPivotPosition(state.position, arbFFVoltage);
} else {
io.setPivotVoltage(arbFFVoltage);
Expand Down

0 comments on commit bf0f62a

Please sign in to comment.