WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
SpeedController.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 #include "PIDOutput.h"
11 
12 namespace frc {
13 
17 class SpeedController : public PIDOutput {
18  public:
19  virtual ~SpeedController() = default;
25  virtual void Set(double speed) = 0;
26 
32  virtual double Get() const = 0;
33 
38  virtual void SetInverted(bool isInverted) = 0;
43  virtual void Disable() = 0;
44 
49  virtual bool GetInverted() const = 0;
50 
54  virtual void StopMotor() = 0;
55 };
56 
57 } // namespace frc
Interface for speed controlling devices.
Definition: SpeedController.h:17
virtual double Get() const =0
Common interface for getting the current set speed of a speed controller.
virtual void Disable()=0
Common interface for disabling a motor.
PIDOutput interface is a generic output for the PID class.
Definition: PIDOutput.h:20
virtual void Set(double speed)=0
Common interface for setting the speed of a speed controller.
virtual void StopMotor()=0
Common interface to stop the motor until Set is called again.
virtual bool GetInverted() const =0
Common interface for returning the inversion state of a speed controller.
virtual void SetInverted(bool isInverted)=0
Common interface for inverting direction of a speed controller.