Skip to content

Commit

Permalink
Fixed bug almost finished
Browse files Browse the repository at this point in the history
  • Loading branch information
EnguerranSorin committed Dec 6, 2023
1 parent 158f419 commit 31d3563
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public static class Intake {
public static class Elevator{
public static final double ELEVATOR_GEAR_RATIO = 0.1008;

private static final double CARRIAGE_RATIO = 2;
public static final double CARRIAGE_RATIO = 2;

private static final double ELEVATOR_SPROCKET_DIAMETER_INCHES = 1.432;
public static final double ELEVATOR_SPROCKET_DIAMETER_INCHES = 1.432;

private static final double FALCON_CPR = 2048;
public static final double FALCON_CPR = 2048;

/**number of ticks per motor revolution */
public static final double TICKS = 2048;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Subsystems/ElevatorSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ElevatorSubsystem() {
public static double inchesToTicks(double height) {
return Elevator.CARRIAGE_RATIO
* (Elevator.ELEVATOR_SPROCKET_DIAMETER_INCHES * Math.PI)
* ((ticks / Elevator.FALCON_CPR) * Elevator.ELEVATOR_GEAR_RATIO);
* ((height / Elevator.FALCON_CPR) * Elevator.ELEVATOR_GEAR_RATIO);
}
public static double ticksToInches(double ticks) {
return Elevator.CARRIAGE_RATIO
Expand Down

0 comments on commit 31d3563

Please sign in to comment.