WPILibC++  2018.4.1-20180924031742-1200-g1aa8446
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Potentiometer.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2008-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/PIDSource.h"
11 
12 namespace frc {
13 
17 class Potentiometer : public PIDSource {
18  public:
19  Potentiometer() = default;
20  virtual ~Potentiometer() = default;
21 
22  Potentiometer(Potentiometer&&) = default;
23  Potentiometer& operator=(Potentiometer&&) = default;
24 
30  virtual double Get() const = 0;
31 
32  void SetPIDSourceType(PIDSourceType pidSource) override;
33 };
34 
35 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:20
void SetPIDSourceType(PIDSourceType pidSource) override
Set which parameter you are using as a process control variable.
virtual double Get() const =0
Common interface for getting the current value of a potentiometer.
Interface for potentiometers.
Definition: Potentiometer.h:17