diff --git a/wpilibc/src/main/native/cpp/SynchronousPID.cpp b/wpilibc/src/main/native/cpp/SynchronousPID.cpp deleted file mode 100644 index 8269ede33b..0000000000 --- a/wpilibc/src/main/native/cpp/SynchronousPID.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* Copyright (c) 2018 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. */ -/*----------------------------------------------------------------------------*/ - -#include "frc/SynchronousPID.h" - -using namespace frc; - -SynchronousPID::SynchronousPID(double Kp, double Ki, double Kd, - PIDSource& source, PIDOutput& output) - : SynchronousPID(Kp, Ki, Kd, 0.0, source, output) {} - -SynchronousPID::SynchronousPID(double Kp, double Ki, double Kd, double Kf, - PIDSource& source, PIDOutput& output) - : PIDBase(Kp, Ki, Kd, Kf, source, output) { - m_enabled = true; -} - -void SynchronousPID::Calculate() { PIDBase::Calculate(); } diff --git a/wpilibc/src/main/native/include/frc/SynchronousPID.h b/wpilibc/src/main/native/include/frc/SynchronousPID.h deleted file mode 100644 index cecd08dd8c..0000000000 --- a/wpilibc/src/main/native/include/frc/SynchronousPID.h +++ /dev/null @@ -1,56 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* Copyright (c) 2018 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. */ -/*----------------------------------------------------------------------------*/ - -#pragma once - -#include "frc/PIDBase.h" - -namespace frc { - -/** - * Class implements a synchronous PID control loop. - * - * Provides a calculate method for the user to call at their desired update - * rate. - */ -class SynchronousPID : public PIDBase { - public: - /** - * Allocate a PID object with the given constants for P, I, and D. - * - * @param Kp the proportional coefficient - * @param Ki the integral coefficient - * @param Kd the derivative coefficient - * @param source The PIDSource object that is used to get values - * @param output The PIDOutput object that is set to the output percentage - */ - SynchronousPID(double Kp, double Ki, double Kd, PIDSource& source, - PIDOutput& output); - - /** - * Allocate a PID object with the given constants for P, I, and D. - * - * @param Kp the proportional coefficient - * @param Ki the integral coefficient - * @param Kd the derivative coefficient - * @param Kf the feed forward term - * @param source The PIDSource object that is used to get values - * @param output The PIDOutput object that is set to the output percentage - */ - SynchronousPID(double Kp, double Ki, double Kd, double Kf, PIDSource& source, - PIDOutput& output); - - SynchronousPID(SynchronousPID&&) = default; - SynchronousPID& operator=(SynchronousPID&&) = default; - - /** - * Read the input, calculate the output accordingly, and write to the output. - */ - void Calculate() override; -}; - -} // namespace frc diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SynchronousPID.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SynchronousPID.java deleted file mode 100644 index 4718f357c6..0000000000 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SynchronousPID.java +++ /dev/null @@ -1,69 +0,0 @@ -/*----------------------------------------------------------------------------*/ -/* Copyright (c) 2018 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. */ -/*----------------------------------------------------------------------------*/ - -package edu.wpi.first.wpilibj; - -/** - * Class implements a synchronous PID control loop. - * - *

Provides a calculate method for the user to call at their desired update rate. - */ -public class SynchronousPID extends PIDBase { - /** - * Allocate a PID object with the given constants for P, I, and D. - * - * @param Kp the proportional coefficient - * @param Ki the integral coefficient - * @param Kd the derivative coefficient - * @param source The PIDSource object that is used to get values - * @param output The PIDOutput object that is set to the output percentage - */ - @SuppressWarnings("ParameterName") - public SynchronousPID(double Kp, double Ki, double Kd, PIDSource source, PIDOutput output) { - this(Kp, Ki, Kd, 0.0, source, output); - } - - /** - * Allocate a PID object with the given constants for P, I, and D. - * - * @param Kp the proportional coefficient - * @param Ki the integral coefficient - * @param Kd the derivative coefficient - * @param Kf the feed forward term - * @param source The PIDSource object that is used to get values - * @param output The PIDOutput object that is set to the output percentage - */ - @SuppressWarnings("ParameterName") - public SynchronousPID(double Kp, double Ki, double Kd, double Kf, PIDSource source, - PIDOutput output) { - super(Kp, Ki, Kd, Kf, source, output); - - m_enabled = true; - } - - /** - * Free the PID object. - */ - @Override - public void free() { - m_thisMutex.lock(); - try { - m_pidOutput = null; - m_pidInput = null; - } finally { - m_thisMutex.unlock(); - } - } - - /** - * Read the input, calculate the output accordingly, and write to the output. - */ - @Override - public void calculate() { // NOPMD - super.calculate(); - } -}