From 89f8cbe0da42839120ba1ef58aa885b192978127 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 4 Oct 2024 20:22:31 +0000 Subject: [PATCH] Apply Prettier format --- src/main/java/frc/robot/Constants.java | 1 + src/main/java/frc/robot/subsystems/drive/Module.java | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index c41d82c..250dfae 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -38,6 +38,7 @@ * constants are needed, to reduce verbosity. */ public final class Constants { + public static final double GRAVITY = 9.81; public static final double SIM_UPDATE_TIME = 0.05; diff --git a/src/main/java/frc/robot/subsystems/drive/Module.java b/src/main/java/frc/robot/subsystems/drive/Module.java index a96de3b..bbacd31 100644 --- a/src/main/java/frc/robot/subsystems/drive/Module.java +++ b/src/main/java/frc/robot/subsystems/drive/Module.java @@ -56,7 +56,11 @@ public Module(ModuleIO io, int index) { // any PID/FF values for controllers idk why case REAL: // TODO: TEST THIS - driveFeedforward = createDriveFeedforward(Constants.Drive.OPTIMAL_VOLTAGE, Constants.Drive.MAX_LINEAR_SPEED, Constants.Drive.WHEEL_GRIP_COEFFICIENT_OF_FRICTION); + driveFeedforward = createDriveFeedforward( + Constants.Drive.OPTIMAL_VOLTAGE, + Constants.Drive.MAX_LINEAR_SPEED, + Constants.Drive.WHEEL_GRIP_COEFFICIENT_OF_FRICTION + ); driveFeedback = new PIDController( Constants.Drive.Module.REAL_DRIVE_PID.kP, Constants.Drive.Module.REAL_DRIVE_PID.kI, @@ -211,7 +215,10 @@ public static void antiJitter( SwerveModuleState lastModuleState, double maxSpeed ) { - if (Math.abs(moduleState.speedMetersPerSecond) <= (maxSpeed * Constants.Drive.ANTI_JITTER_DRIVE_THRESHOLD)) { + if ( + Math.abs(moduleState.speedMetersPerSecond) <= + (maxSpeed * Constants.Drive.ANTI_JITTER_DRIVE_THRESHOLD) + ) { moduleState.angle = lastModuleState.angle; } }