c
This commit is contained in:
parent
7acecdd8a9
commit
f8f03dde51
@ -25,7 +25,8 @@ public class Drive extends SubsystemBase {
|
|||||||
SwerveDrive swerveDrive;
|
SwerveDrive swerveDrive;
|
||||||
|
|
||||||
File swerveJsonDirectory = new File(Filesystem.getDeployDirectory(),"swerve");
|
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){
|
public void drive(double x, double y, double zRotation){
|
||||||
swerveDrive.drive(new Translation2d(x*5, y*5), zRotation*4, true, false);
|
swerveDrive.drive(new Translation2d(x*5, y*5), zRotation*4, true, false);
|
||||||
}
|
}
|
||||||
@ -49,7 +50,7 @@ public class Drive extends SubsystemBase {
|
|||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
public void restgyroscope(){
|
public void restgyroscope(){
|
||||||
gyroscope.reset();
|
Gyro.reset();
|
||||||
}
|
}
|
||||||
public SwerveModulePosition[] distance(){
|
public SwerveModulePosition[] distance(){
|
||||||
return swerveDrive.getModulePositions();
|
return swerveDrive.getModulePositions();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user