Skip to content

Commit

Permalink
Apply Prettier format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 14, 2024
1 parent 90472ab commit adc649c
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/main/java/frc/robot/subsystems/drive/Drive.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,28 +219,28 @@ public void drive(
DriverStation.getAlliance().isPresent() &&
DriverStation.getAlliance().get() == Alliance.Red;
drive.runVelocity(
fieldRelative ?
ChassisSpeeds.fromFieldRelativeSpeeds(
linearVelocity.getX() *
drive.getMaxLinearSpeedMetersPerSec() *
translationMultiplier,
linearVelocity.getY() *
drive.getMaxLinearSpeedMetersPerSec() *
translationMultiplier,
omega * drive.getMaxAngularSpeedRadPerSec() * rotationMultiplier,
(isFlipped
? drive.getRotation().plus(new Rotation2d(Math.PI))
: drive.getRotation()).times(-1)
) :
new ChassisSpeeds(
linearVelocity.getX() *
drive.getMaxLinearSpeedMetersPerSec() *
translationMultiplier,
linearVelocity.getY() *
drive.getMaxLinearSpeedMetersPerSec() *
translationMultiplier,
omega * drive.getMaxAngularSpeedRadPerSec() * rotationMultiplier
)
fieldRelative
? ChassisSpeeds.fromFieldRelativeSpeeds(
linearVelocity.getX() *
drive.getMaxLinearSpeedMetersPerSec() *
translationMultiplier,
linearVelocity.getY() *
drive.getMaxLinearSpeedMetersPerSec() *
translationMultiplier,
omega * drive.getMaxAngularSpeedRadPerSec() * rotationMultiplier,
(isFlipped
? drive.getRotation().plus(new Rotation2d(Math.PI))
: drive.getRotation()).times(-1)
)
: new ChassisSpeeds(
linearVelocity.getX() *
drive.getMaxLinearSpeedMetersPerSec() *
translationMultiplier,
linearVelocity.getY() *
drive.getMaxLinearSpeedMetersPerSec() *
translationMultiplier,
omega * drive.getMaxAngularSpeedRadPerSec() * rotationMultiplier
)
);
}

Expand Down

0 comments on commit adc649c

Please sign in to comment.