From a5558560eb3525bfb867d0c2c02f8311dfeff241 Mon Sep 17 00:00:00 2001 From: Benjamin Hall Date: Thu, 12 Dec 2024 20:04:43 -0500 Subject: [PATCH] Add missing Java units usage in TunerConstants --- .../src/main/java/frc/robot/generated/TunerConstants.java | 4 ++-- .../src/main/java/frc/robot/generated/TunerConstants.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/SwerveWithChoreo/src/main/java/frc/robot/generated/TunerConstants.java b/java/SwerveWithChoreo/src/main/java/frc/robot/generated/TunerConstants.java index 9c841f8f..90cd4702 100644 --- a/java/SwerveWithChoreo/src/main/java/frc/robot/generated/TunerConstants.java +++ b/java/SwerveWithChoreo/src/main/java/frc/robot/generated/TunerConstants.java @@ -87,8 +87,8 @@ public class TunerConstants { private static final int kPigeonId = 1; // These are only used for simulation - private static final double kSteerInertia = 0.01; - private static final double kDriveInertia = 0.01; + private static final MomentOfInertia kSteerInertia = KilogramSquareMeters.of(0.01); + private static final MomentOfInertia kDriveInertia = KilogramSquareMeters.of(0.01); // Simulated voltage necessary to overcome friction private static final Voltage kSteerFrictionVoltage = Volts.of(0.2); private static final Voltage kDriveFrictionVoltage = Volts.of(0.2); diff --git a/java/SwerveWithPathPlanner/src/main/java/frc/robot/generated/TunerConstants.java b/java/SwerveWithPathPlanner/src/main/java/frc/robot/generated/TunerConstants.java index 9c841f8f..90cd4702 100644 --- a/java/SwerveWithPathPlanner/src/main/java/frc/robot/generated/TunerConstants.java +++ b/java/SwerveWithPathPlanner/src/main/java/frc/robot/generated/TunerConstants.java @@ -87,8 +87,8 @@ public class TunerConstants { private static final int kPigeonId = 1; // These are only used for simulation - private static final double kSteerInertia = 0.01; - private static final double kDriveInertia = 0.01; + private static final MomentOfInertia kSteerInertia = KilogramSquareMeters.of(0.01); + private static final MomentOfInertia kDriveInertia = KilogramSquareMeters.of(0.01); // Simulated voltage necessary to overcome friction private static final Voltage kSteerFrictionVoltage = Volts.of(0.2); private static final Voltage kDriveFrictionVoltage = Volts.of(0.2);