This commit is contained in:
Antoine PerreaultE 2024-02-29 16:15:45 -05:00
parent 7acecdd8a9
commit f8f03dde51

View File

@ -25,7 +25,8 @@ public class Drive extends SubsystemBase {
SwerveDrive swerveDrive;
File swerveJsonDirectory = new File(Filesystem.getDeployDirectory(),"swerve");
public AHRS gyroscope = new AHRS();
public AHRS Gyro = new AHRS();
public void drive(double x, double y, double zRotation){
swerveDrive.drive(new Translation2d(x*5, y*5), zRotation*4, true, false);
}
@ -49,7 +50,7 @@ public class Drive extends SubsystemBase {
}, this);
}
public void restgyroscope(){
gyroscope.reset();
Gyro.reset();
}
public SwerveModulePosition[] distance(){
return swerveDrive.getModulePositions();