WPILibC++  2018.4.1-20180924003241-1198-g0c58a0a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
SynchronousPID.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include "frc/PIDBase.h"
11 
12 namespace frc {
13 
20 class SynchronousPID : public PIDBase {
21  public:
31  SynchronousPID(double Kp, double Ki, double Kd, PIDSource& source,
32  PIDOutput& output);
33 
44  SynchronousPID(double Kp, double Ki, double Kd, double Kf, PIDSource& source,
45  PIDOutput& output);
46 
47  SynchronousPID(const SynchronousPID&) = delete;
48  SynchronousPID& operator=(const SynchronousPID) = delete;
49 
53  void Calculate() override;
54 };
55 
56 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:20
Class implements a synchronous PID control loop.
Definition: SynchronousPID.h:20
PIDOutput interface is a generic output for the PID class.
Definition: PIDOutput.h:20
SynchronousPID(double Kp, double Ki, double Kd, PIDSource &source, PIDOutput &output)
Allocate a PID object with the given constants for P, I, and D.
void Calculate() override
Read the input, calculate the output accordingly, and write to the output.
Class implements a PID Control Loop.
Definition: PIDBase.h:36