From dafe79fe8d39ca307d20107841b8a06c1f80fb4a Mon Sep 17 00:00:00 2001 From: thenetworkgrinch Date: Wed, 15 Jan 2025 12:38:02 -0600 Subject: [PATCH] Reverted attainable change. Signed-off-by: thenetworkgrinch --- src/main/java/swervelib/SwerveDrive.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/swervelib/SwerveDrive.java b/src/main/java/swervelib/SwerveDrive.java index 1645b300..ab8baa68 100644 --- a/src/main/java/swervelib/SwerveDrive.java +++ b/src/main/java/swervelib/SwerveDrive.java @@ -335,7 +335,7 @@ public SwerveDrive( HAL.report(kResourceType_RobotDrive, kRobotDriveSwerve_YAGSL); // Defaulting to something reasonable for most robots - setMaximumAttainableSpeeds(maxSpeedMPS, 2 * Math.PI); + // setMaximumAttainableSpeeds(maxSpeedMPS, 2 * Math.PI); } /** @@ -664,7 +664,7 @@ public void setMaximumAllowableSpeeds( */ public double getMaximumChassisVelocity() { - return Math.min(this.attainableMaxTranslationalSpeedMetersPerSecond, maxChassisSpeedMPS); + return Math.max(this.attainableMaxTranslationalSpeedMetersPerSecond, maxChassisSpeedMPS); } /** @@ -695,7 +695,7 @@ public AngularVelocity getMaximumModuleAngleVelocity() */ public double getMaximumChassisAngularVelocity() { - return Math.min(this.attainableMaxRotationalVelocityRadiansPerSecond, swerveController.config.maxAngularVelocity); + return Math.max(this.attainableMaxRotationalVelocityRadiansPerSecond, swerveController.config.maxAngularVelocity); } /**