Deprecate old PID classes (#1964)

PIDBase was only used by the old PIDController, which is deprecated.
PIDInterface is only used by PIDBase, and that's deprecated by this
commit.
This commit is contained in:
Tyler Veness
2019-10-24 20:32:31 -07:00
committed by Peter Johnson
parent 02264db69c
commit d04eb35465
4 changed files with 11 additions and 2 deletions

View File

@@ -50,6 +50,7 @@ class PIDBase : public PIDInterface,
* @param source The PIDSource object that is used to get values
* @param output The PIDOutput object that is set to the output value
*/
WPI_DEPRECATED("All APIs which use this have been deprecated.")
PIDBase(double p, double i, double d, PIDSource& source, PIDOutput& output);
/**
@@ -61,6 +62,7 @@ class PIDBase : public PIDInterface,
* @param source The PIDSource object that is used to get values
* @param output The PIDOutput object that is set to the output value
*/
WPI_DEPRECATED("All APIs which use this have been deprecated.")
PIDBase(double p, double i, double d, double f, PIDSource& source,
PIDOutput& output);

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -7,10 +7,13 @@
#pragma once
#include <wpi/deprecated.h>
namespace frc {
class PIDInterface {
public:
WPI_DEPRECATED("All APIs which use this have been deprecated.")
PIDInterface() = default;
PIDInterface(PIDInterface&&) = default;
PIDInterface& operator=(PIDInterface&&) = default;