From f8f03dde5142670e5bdf665260e59f6a09345385 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Thu, 29 Feb 2024 16:15:45 -0500 Subject: [PATCH] c --- src/main/java/frc/robot/subsystem/Drive.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/subsystem/Drive.java b/src/main/java/frc/robot/subsystem/Drive.java index 1adcc9d..54f1d3f 100644 --- a/src/main/java/frc/robot/subsystem/Drive.java +++ b/src/main/java/frc/robot/subsystem/Drive.java @@ -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();