WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
GyroBase.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 "SensorBase.h"
11 #include "PIDSource.h"
12 #include "interfaces/Gyro.h"
13 #include "LiveWindow/LiveWindowSendable.h"
14 
15 #include <memory>
16 
21 class GyroBase : public Gyro, public SensorBase, public PIDSource, public LiveWindowSendable {
22  public:
23  virtual ~GyroBase() = default;
24 
25  // PIDSource interface
26  double PIDGet() override;
27 
28  void UpdateTable() override;
29  void StartLiveWindowMode() override;
30  void StopLiveWindowMode() override;
31  std::string GetSmartDashboardType() const override;
32  void InitTable(std::shared_ptr<ITable> subTable) override;
33  std::shared_ptr<ITable> GetTable() const override;
34 
35  private:
36  std::shared_ptr<ITable> m_table;
37 };
double PIDGet() override
Get the PIDOutput for the PIDSource base object.
Definition: GyroBase.cpp:18
Live Window Sendable is a special type of object sendable to the live window.
Definition: LiveWindowSendable.h:18
void InitTable(std::shared_ptr< ITable > subTable) override
Initializes a table for this sendable object.
Definition: GyroBase.cpp:41
void StopLiveWindowMode() override
Stop having this sendable object automatically respond to value changes.
Definition: GyroBase.cpp:37
GyroBase is the common base class for Gyro implementations such as AnalogGyro.
Definition: GyroBase.h:21
Base class for all sensors.
Definition: SensorBase.h:20
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:18
void UpdateTable() override
Update the table for this sendable object with the latest values.
Definition: GyroBase.cpp:29
Interface for yaw rate gyros.
Definition: Gyro.h:13
std::shared_ptr< ITable > GetTable() const override
Definition: GyroBase.cpp:46
void StartLiveWindowMode() override
Start having this sendable object automatically respond to value changes reflect the value on the tab...
Definition: GyroBase.cpp:35
std::string GetSmartDashboardType() const override
Definition: GyroBase.cpp:39