From 8faabc408a4f113cddffa8d2202a623c425f4da4 Mon Sep 17 00:00:00 2001 From: Jonah Snider Date: Sun, 3 Apr 2022 20:02:51 -0700 Subject: [PATCH] Remove unused methods --- src/main/java/frc/robot/drive/Drivebase.java | 9 --------- src/main/java/frc/robot/drive/Wheel.java | 5 ----- src/main/java/frc/robot/drive/WheelIO.java | 3 --- src/main/java/frc/robot/drive/WheelIOFalcon500.java | 5 ----- src/main/java/frc/robot/drive/WheelIOReplay.java | 5 ----- 5 files changed, 27 deletions(-) diff --git a/src/main/java/frc/robot/drive/Drivebase.java b/src/main/java/frc/robot/drive/Drivebase.java index 063c0b0..db44978 100644 --- a/src/main/java/frc/robot/drive/Drivebase.java +++ b/src/main/java/frc/robot/drive/Drivebase.java @@ -35,8 +35,6 @@ public Drivebase( default: throw new UnknownTargetRobotException(); } - - zeroEncoders(); } @Override @@ -73,11 +71,4 @@ public void setWheelSpeeds(MecanumDriveWheelSpeeds wheelSpeeds) { public void stopMotors() { setWheelSpeeds(new MecanumDriveWheelSpeeds()); } - - public void zeroEncoders() { - frontLeft.zeroEncoder(); - frontRight.zeroEncoder(); - rearLeft.zeroEncoder(); - rearRight.zeroEncoder(); - } } diff --git a/src/main/java/frc/robot/drive/Wheel.java b/src/main/java/frc/robot/drive/Wheel.java index 79cb2e0..26788a7 100644 --- a/src/main/java/frc/robot/drive/Wheel.java +++ b/src/main/java/frc/robot/drive/Wheel.java @@ -135,9 +135,4 @@ public double getVelocity() { public double getDistance() { return WHEEL_CONVERTER.radiansToDistance(inputs.positionRadians); } - - /** Zeroes the encoder position. */ - public void zeroEncoder() { - io.zeroEncoder(); - } } diff --git a/src/main/java/frc/robot/drive/WheelIO.java b/src/main/java/frc/robot/drive/WheelIO.java index f204a0a..00373f0 100644 --- a/src/main/java/frc/robot/drive/WheelIO.java +++ b/src/main/java/frc/robot/drive/WheelIO.java @@ -36,7 +36,4 @@ public void fromLog(LogTable table) { /** Sets the output voltage of the wheel's motor. */ public void setVoltage(double outputVolts); - - /** Zeroes the encoder position. */ - public void zeroEncoder(); } diff --git a/src/main/java/frc/robot/drive/WheelIOFalcon500.java b/src/main/java/frc/robot/drive/WheelIOFalcon500.java index 273b79d..6228d92 100644 --- a/src/main/java/frc/robot/drive/WheelIOFalcon500.java +++ b/src/main/java/frc/robot/drive/WheelIOFalcon500.java @@ -104,9 +104,4 @@ public void updateInputs(Inputs inputs) { public void setVoltage(double outputVolts) { motor.setVoltage(outputVolts); } - - @Override - public void zeroEncoder() { - motor.setSelectedSensorPosition(0); - } } diff --git a/src/main/java/frc/robot/drive/WheelIOReplay.java b/src/main/java/frc/robot/drive/WheelIOReplay.java index dae2a05..a50ed88 100644 --- a/src/main/java/frc/robot/drive/WheelIOReplay.java +++ b/src/main/java/frc/robot/drive/WheelIOReplay.java @@ -18,9 +18,4 @@ public void updateInputs(Inputs inputs) { public void setVoltage(double outputVolts) { // Intentionally left empty } - - @Override - public void zeroEncoder() { - // Intentionally left empty - } }