Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
more gear ratios yay
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoticthegreat committed Nov 7, 2024
1 parent 5f41818 commit 58dfd10
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
public final class AmpevatorConstants {

public static final int ampevatorID = 47;
public static final int ampevatorBeamBreakID = 0;

public static final double gearRatio = 30.0 / 11; // need to use this eventually

public static final TalonFXConfiguration motorConfigs =
new TalonFXConfiguration()
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/subsystems/climb/Climb.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void periodic() {
}

public Command setPosition(double position) {
return this.run(() -> climbIO.setPosition(position * ClimbConstants.gearRatio));
return this.run(() -> climbIO.setPosition(position / ClimbConstants.gearRatio));
}

public Command setVoltage(double voltage) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/subsystems/climb/ClimbConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
public final class ClimbConstants {

public static final int kLeftClimbMotorID = 45;
public static final double gearRatio = 20; // needs to be tuned
public static final double gearRatio = 1.0 / 24; // needs to be tuned

public static final double kClimbUpPosition = 150 / 20;
public static final double kClimbUpPosition = 0;

public static final double kClimbDownPosition = 0;
public static final double kClimbDownPosition = 0; // TODO: tune
public static final double wheelRadius = 1;

public static double kCurrentThreshold = 4.5;
Expand Down

0 comments on commit 58dfd10

Please sign in to comment.