WPILibC++  unspecified
PIDSource.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2008-2017 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 namespace frc {
11 
12 enum class PIDSourceType { kDisplacement, kRate };
13 
19 class PIDSource {
20  public:
21  virtual void SetPIDSourceType(PIDSourceType pidSource);
22  PIDSourceType GetPIDSourceType() const;
23  virtual double PIDGet() = 0;
24 
25  protected:
26  PIDSourceType m_pidSource = PIDSourceType::kDisplacement;
27 };
28 
29 } // namespace frc
Definition: Timer.cpp:18
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:19