Skip to content

Commit

Permalink
as limit approaches 0
Browse files Browse the repository at this point in the history
  • Loading branch information
bbdriverstation2 committed Mar 9, 2025
1 parent 3b89e8a commit a4fa976
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/constants/ArmConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ArmConstants {
public static double kV = 1.5096;
public static double kG = 0.18;
public static double kA = 0.33715;
public static double kP = 3;
public static double kP = 4;
public static double kI = 0.2;
public static double kD = 0;
public static final double kArmToleranceRPS = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/constants/ElevatorConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ public class ElevatorConstants {
public static double kV = 10.604;
public static double kG = 0;
public static double kA = 2.2017;
public static double kP = 110;
public static double kP = 125;
public static double kI = 0;
public static double kD = 0;


public static double L1 = 0;
public static double L2 = -0.244;
public static double L3 = 0.0885;
public static double L4 = 0.607;
public static double L4 = 0.610;
public static double carriageMass = 20.0;
public static double maxHeight = 0.617;
public static double minHeight = -0.280;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void setElevatorVoltageCommandBypass(double volts) {
outputVoltage = Math.signum(outputVoltage) == -1 ? outputVoltage : 0;
} else if ((getLoadHeight() <= ElevatorConstants.minHeight + 0.01)) {
outputVoltage = Math.signum(outputVoltage) == 1 ? outputVoltage : outputVoltage * 0.333;
} else if (getLoadHeight() >= ElevatorConstants.maxHeight - 0.01) {
} else if (getLoadHeight() >= ElevatorConstants.maxHeight - 0.005) {
outputVoltage = Math.signum(outputVoltage) == -1 ? outputVoltage : outputVoltage * 0.333;

}
Expand Down

0 comments on commit a4fa976

Please sign in to comment.