From 41f27b63deb21b1cb90f3d400e2d8679b1b0f4f7 Mon Sep 17 00:00:00 2001 From: Hayden Heroux Date: Tue, 20 Feb 2024 14:52:17 -0500 Subject: [PATCH] refactor(swerve): Add constants for gear ratios. --- .../java/frc/robot/swerve/SwerveConstants.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/swerve/SwerveConstants.java b/src/main/java/frc/robot/swerve/SwerveConstants.java index 5d9d0de..09cb752 100644 --- a/src/main/java/frc/robot/swerve/SwerveConstants.java +++ b/src/main/java/frc/robot/swerve/SwerveConstants.java @@ -18,8 +18,20 @@ public static class MK4iConstants { /** Moment of inertia of the wheel when steering in joules kilograms meters squared. */ public static final double STEER_MOI = 0.004; // TODO + /** Gearing between the drive motor and the wheel for the L1 gear ratio. */ + public static final double L1 = 8.14; + + /** Gearing between the drive motor and the wheel for the L2 gear ratio. */ + public static final double L2 = 6.75; + + /** Gearing between the drive motor and the wheel for the L3 gear ratio. */ + public static final double L3 = 6.12; + + /** Gearing between the drive motor and the wheel for the L4 gear ratio. */ + public static final double L4 = 5.14; + /** Gearing between the drive motor and the wheel. */ - public static final double DRIVE_GEARING = 6.75; + public static final double DRIVE_GEARING = L2; /** Diameter of the MK4i's wheels in meters. */ public static final double WHEEL_DIAMETER = Units.inchesToMeters(4.0);