diff --git a/wpilibc/src/main/native/include/frc/AnalogPotentiometer.h b/wpilibc/src/main/native/include/frc/AnalogPotentiometer.h index 1f26242158..c6034e06ce 100644 --- a/wpilibc/src/main/native/include/frc/AnalogPotentiometer.h +++ b/wpilibc/src/main/native/include/frc/AnalogPotentiometer.h @@ -8,7 +8,6 @@ #include "frc/AnalogInput.h" #include "frc/ErrorBase.h" -#include "frc/interfaces/Potentiometer.h" #include "frc/smartdashboard/Sendable.h" #include "frc/smartdashboard/SendableHelper.h" @@ -23,7 +22,6 @@ class SendableBuilder; * constructor. */ class AnalogPotentiometer : public ErrorBase, - public Potentiometer, public Sendable, public SendableHelper { public: @@ -105,7 +103,7 @@ class AnalogPotentiometer : public ErrorBase, * @return The current position of the potentiometer (in the units used for * fullRange and offset). */ - double Get() const override; + double Get() const; void InitSendable(SendableBuilder& builder) override; diff --git a/wpilibc/src/main/native/include/frc/interfaces/Potentiometer.h b/wpilibc/src/main/native/include/frc/interfaces/Potentiometer.h deleted file mode 100644 index ac3125c9f5..0000000000 --- a/wpilibc/src/main/native/include/frc/interfaces/Potentiometer.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. - -#pragma once - -namespace frc { - -/** - * Interface for potentiometers. - */ -class Potentiometer { - public: - Potentiometer() = default; - virtual ~Potentiometer() = default; - - Potentiometer(Potentiometer&&) = default; - Potentiometer& operator=(Potentiometer&&) = default; - - /** - * Common interface for getting the current value of a potentiometer. - * - * @return The current set speed. Value is between -1.0 and 1.0. - */ - virtual double Get() const = 0; -}; - -} // namespace frc diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java index 9c74f5e216..b752ddba05 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AnalogPotentiometer.java @@ -4,7 +4,6 @@ package edu.wpi.first.wpilibj; -import edu.wpi.first.wpilibj.interfaces.Potentiometer; import edu.wpi.first.wpilibj.smartdashboard.SendableBuilder; import edu.wpi.first.wpilibj.smartdashboard.SendableRegistry; @@ -13,7 +12,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SendableRegistry; * corresponds to a position. The position is in whichever units you choose, by way of the scaling * and offset constants passed to the constructor. */ -public class AnalogPotentiometer implements Potentiometer, Sendable, AutoCloseable { +public class AnalogPotentiometer implements Sendable, AutoCloseable { private AnalogInput m_analogInput; private boolean m_initAnalogInput; private double m_fullRange; @@ -119,7 +118,6 @@ public class AnalogPotentiometer implements Potentiometer, Sendable, AutoCloseab * * @return The current position of the potentiometer. */ - @Override public double get() { if (m_analogInput == null) { return m_offset; diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Potentiometer.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Potentiometer.java deleted file mode 100644 index 99735c379f..0000000000 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/interfaces/Potentiometer.java +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) FIRST and other WPILib contributors. -// Open Source Software; you can modify and/or share it under the terms of -// the WPILib BSD license file in the root directory of this project. - -package edu.wpi.first.wpilibj.interfaces; - -/** Interface for a Potentiometer. */ -public interface Potentiometer { - double get(); -} diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/pacgoat/subsystems/Pivot.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/pacgoat/subsystems/Pivot.java index 184125002f..620476fe97 100644 --- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/pacgoat/subsystems/Pivot.java +++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/pacgoat/subsystems/Pivot.java @@ -10,7 +10,6 @@ import edu.wpi.first.wpilibj.SpeedController; import edu.wpi.first.wpilibj.Victor; import edu.wpi.first.wpilibj.command.PIDSubsystem; import edu.wpi.first.wpilibj.examples.pacgoat.Robot; -import edu.wpi.first.wpilibj.interfaces.Potentiometer; /** * The Pivot subsystem contains the Van-door motor and the pot for PID control of angle of the pivot @@ -29,7 +28,7 @@ public class Pivot extends PIDSubsystem { // 0 degrees is vertical facing up. // Angle increases the more forward the pivot goes. - private final Potentiometer m_pot = new AnalogPotentiometer(1); + private final AnalogPotentiometer m_pot = new AnalogPotentiometer(1); // Motor to move the pivot. private final SpeedController m_motor = new Victor(5);