Skip to content

Commit

Permalink
Reverted attainable change.
Browse files Browse the repository at this point in the history
Signed-off-by: thenetworkgrinch <thenetworkgrinch@users.noreply.github.com>
  • Loading branch information
thenetworkgrinch committed Jan 15, 2025
1 parent 3a9dfac commit dafe79f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/swervelib/SwerveDrive.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -664,7 +664,7 @@ public void setMaximumAllowableSpeeds(
*/
public double getMaximumChassisVelocity()
{
return Math.min(this.attainableMaxTranslationalSpeedMetersPerSecond, maxChassisSpeedMPS);
return Math.max(this.attainableMaxTranslationalSpeedMetersPerSecond, maxChassisSpeedMPS);
}

/**
Expand Down Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit dafe79f

Please sign in to comment.