Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
formatting tweaks and minor AutonWheelTurn adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielseaver9678 committed Mar 24, 2021
1 parent eef7eef commit 910de00
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Binary file modified swervelib/bin/main/frc/team1711/swerve/commands/AutonDrive.class
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public class AutonDrive extends SequentialCommandGroup {
public AutonDrive (AutoSwerveDrive swerveDrive, double direction, double distance, double speed, FrameOfReference frameOfReference) {
if (frameOfReference == FrameOfReference.FIELD) direction -= swerveDrive.getGyroAngle();
addCommands(
new AutonWheelTurn(swerveDrive, direction),
new AutonDriveSimple(swerveDrive, direction, distance, speed));
new AutonWheelTurn(swerveDrive, direction),
new AutonDriveSimple(swerveDrive, direction, distance, speed));
}

/**
Expand All @@ -49,7 +49,12 @@ public AutonDrive (AutoSwerveDrive swerveDrive, double direction, double distanc
* to the gyro's initial orientation.
* @return The {@code AutonDrive}
*/
public static AutonDrive fromMovement (AutoSwerveDrive swerveDrive, double inchesRight, double inchesForward, double speed, FrameOfReference frameOfReference) {
public static AutonDrive fromMovement (
AutoSwerveDrive swerveDrive,
double inchesRight,
double inchesForward,
double speed,
FrameOfReference frameOfReference) {
final Vector moveVector = new Vector(inchesRight, inchesForward);
return new AutonDrive(swerveDrive, moveVector.getRotationDegrees(), moveVector.getMagnitude(), speed, frameOfReference);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class AutonWheelTurn extends CommandBase {
@Override
public void initialize () {
swerveDrive.stop();
swerveDrive.setDistanceReference();
}

@Override
Expand Down

0 comments on commit 910de00

Please sign in to comment.