WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
frc::PIDSource Class Referenceabstract

PIDSource interface is a generic sensor source for the PID class. More...

#include <PIDSource.h>

Inheritance diagram for frc::PIDSource:
frc::AnalogAccelerometer frc::AnalogInput frc::Encoder frc::Filter frc::GyroBase frc::PIDCommand frc::PIDSubsystem frc::Potentiometer frc::Ultrasonic

Public Member Functions

virtual void SetPIDSourceType (PIDSourceType pidSource)
 Set which parameter you are using as a process control variable. More...
 
virtual PIDSourceType GetPIDSourceType () const
 
virtual double PIDGet ()=0
 

Protected Attributes

PIDSourceType m_pidSource = PIDSourceType::kDisplacement
 

Detailed Description

PIDSource interface is a generic sensor source for the PID class.

All sensors that can be used with the PID class will implement the PIDSource that returns a standard value that will be used in the PID code.

Member Function Documentation

virtual void frc::PIDSource::SetPIDSourceType ( PIDSourceType  pidSource)
virtual

Set which parameter you are using as a process control variable.

Parameters
pidSourceAn enum to select the parameter.

Reimplemented in frc::Ultrasonic, frc::Potentiometer, and frc::Filter.


The documentation for this class was generated from the following file: