WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
PIDSource.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2008-2016. 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 enum class PIDSourceType { kDisplacement, kRate };
11 
18 class PIDSource {
19  public:
20  virtual void SetPIDSourceType(PIDSourceType pidSource);
21  PIDSourceType GetPIDSourceType() const;
22  virtual double PIDGet() = 0;
23 
24  protected:
25  PIDSourceType m_pidSource = PIDSourceType::kDisplacement;
26 };
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:18
virtual void SetPIDSourceType(PIDSourceType pidSource)
Set which parameter you are using as a process control variable.
Definition: PIDSource.cpp:15