blob: 6ed44aa9226957619e03e8be9996ac7c2e8a04a9 [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 "SensorBase.h"
10#include "PIDSource.h"
11#include "interfaces/Gyro.h"
12#include "LiveWindow/LiveWindowSendable.h"
13
14#include <memory>
15
16/**
17 * GyroBase is the common base class for Gyro implementations such as
18 * AnalogGyro.
19 */
20class GyroBase : public Gyro, public SensorBase, public PIDSource, public LiveWindowSendable {
21 public:
22 virtual ~GyroBase() = default;
23
24 // PIDSource interface
25 double PIDGet() override;
26
27 void UpdateTable() override;
28 void StartLiveWindowMode() override;
29 void StopLiveWindowMode() override;
30 std::string GetSmartDashboardType() const override;
31 void InitTable(std::shared_ptr<ITable> subTable) override;
32 std::shared_ptr<ITable> GetTable() const override;
33
34 private:
35 std::shared_ptr<ITable> m_table;
36};