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 "HAL/HAL.hpp"
11 #include "PIDOutput.h"
12 
16 class SpeedController : public PIDOutput {
17  public:
18  virtual ~SpeedController() = default;
26  virtual void Set(float speed, uint8_t syncGroup = 0) = 0;
27 
33  virtual float Get() const = 0;
34 
39  virtual void SetInverted(bool isInverted) = 0;
44  virtual void Disable() = 0;
45 
50  virtual bool GetInverted() const = 0;
51 
55  virtual void StopMotor() = 0;
56 };
virtual bool GetInverted() const =0
Common interface for returning the inversion state of a speed controller.
PIDOutput interface is a generic output for the PID class.
Definition: PIDOutput.h:18
virtual void Disable()=0
Common interface for disabling a motor.
virtual void Set(float speed, uint8_t syncGroup=0)=0
Common interface for setting the speed of a speed controller.
Interface for speed controlling devices.
Definition: SpeedController.h:16
virtual float Get() const =0
Common interface for getting the current set speed of a speed controller.
virtual void StopMotor()=0
Common interface to stop the motor until Set is called again.
virtual void SetInverted(bool isInverted)=0
Common interface for inverting direction of a speed controller.