blob: 97057c30e496dd533e0e0db11097a70c7d8240b8 [file] [log] [blame]
Brian Silvermanf7f267a2017-02-04 16:16:08 -08001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2008-2017. 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
12namespace frc {
13
14/**
15 * Interface for speed controlling devices.
16 */
17class SpeedController : public PIDOutput {
18 public:
19 virtual ~SpeedController() = default;
20 /**
21 * Common interface for setting the speed of a speed controller.
22 *
23 * @param speed The speed to set. Value should be between -1.0 and 1.0.
24 */
25 virtual void Set(double speed) = 0;
26 /**
27 * Common interface for getting the current set speed of a speed controller.
28 *
29 * @return The current set speed. Value is between -1.0 and 1.0.
30 */
31 virtual double Get() const = 0;
32 /**
33 * Common interface for disabling a motor.
34 */
35 virtual void Disable() = 0;
36};
37
38} // namespace frc