[wpilib] Remove Potentiometer interface

This commit is contained in:
Peter Johnson
2021-03-12 15:54:22 -08:00
parent 687066af3d
commit b7b178f49c
5 changed files with 3 additions and 46 deletions

View File

@@ -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<AnalogPotentiometer> {
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;

View File

@@ -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