blob: 38764b850da3d785fea81c586db94afa6df96adc [file] [log] [blame]
Brian Silverman26e4e522015-12-17 01:56:40 -05001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2008. All Rights Reserved.
3 */
4/* Open Source Software - may be modified and shared by FRC teams. The code */
5/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
6/*----------------------------------------------------------------------------*/
7#pragma once
8
9#include "SafePWM.h"
10#include "SpeedController.h"
11#include "PIDOutput.h"
12
13/**
14 * Cross the Road Electronics (CTRE) Talon and Talon SR Speed Controller
15 */
16class Talon : public SafePWM, public SpeedController {
17 public:
18 explicit Talon(uint32_t channel);
19 virtual ~Talon() = default;
20 virtual void Set(float value, uint8_t syncGroup = 0) override;
21 virtual float Get() const override;
22 virtual void Disable() override;
23
24 virtual void PIDWrite(float output) override;
25 virtual void SetInverted(bool isInverted) override;
26 virtual bool GetInverted() const override;
27
28 private:
29 bool m_isInverted = false;
30};