This commit is contained in:
samuel desharnais
2024-02-13 18:54:44 -05:00
parent fbeacc51e3
commit 0d798a1227
2 changed files with 49 additions and 5 deletions

View File

@ -28,12 +28,12 @@ public class Drive extends SubsystemBase {
File swerveJsonDirectory = new File(Filesystem.getDeployDirectory(),"swerve");
public void drive(double x, double y, double zRotation){
swerveDrive.drive(new Translation2d(x*2, y*2), zRotation, true, false);
swerveDrive.drive(new Translation2d(x*3, y*3), zRotation, true, false);
}
public Drive() {
try {
this.swerveDrive = new SwerveParser(swerveJsonDirectory).createSwerveDrive(2);
this.swerveDrive = new SwerveParser(swerveJsonDirectory).createSwerveDrive(3);
} catch (IOException e) {
e.printStackTrace();
}