2020-12-26 14:12:05 -08:00
|
|
|
// 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.
|
2016-01-02 03:02:34 -08:00
|
|
|
|
2015-06-15 13:48:53 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
2019-10-24 20:32:31 -07:00
|
|
|
#include <wpi/deprecated.h>
|
|
|
|
|
|
2016-11-01 22:33:12 -07:00
|
|
|
namespace frc {
|
|
|
|
|
|
2020-03-31 20:43:04 -07:00
|
|
|
/**
|
|
|
|
|
* Interface for PID Control Loop.
|
|
|
|
|
*
|
|
|
|
|
* @deprecated All APIs which use this have been deprecated.
|
|
|
|
|
*/
|
2018-05-16 19:51:37 -07:00
|
|
|
class PIDInterface {
|
2018-09-24 00:08:25 -07:00
|
|
|
public:
|
2019-10-24 20:32:31 -07:00
|
|
|
WPI_DEPRECATED("All APIs which use this have been deprecated.")
|
2018-09-24 00:08:25 -07:00
|
|
|
PIDInterface() = default;
|
|
|
|
|
PIDInterface(PIDInterface&&) = default;
|
|
|
|
|
PIDInterface& operator=(PIDInterface&&) = default;
|
|
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
virtual void SetPID(double p, double i, double d) = 0;
|
|
|
|
|
virtual double GetP() const = 0;
|
|
|
|
|
virtual double GetI() const = 0;
|
|
|
|
|
virtual double GetD() const = 0;
|
2015-06-15 13:48:53 -04:00
|
|
|
|
2016-11-20 07:25:03 -08:00
|
|
|
virtual void SetSetpoint(double setpoint) = 0;
|
2015-06-25 15:07:55 -04:00
|
|
|
virtual double GetSetpoint() const = 0;
|
2015-06-15 13:48:53 -04:00
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
virtual void Reset() = 0;
|
2015-06-15 13:48:53 -04:00
|
|
|
};
|
2016-11-01 22:33:12 -07:00
|
|
|
|
|
|
|
|
} // namespace frc
|