WPILibC++  2019.2.1-19-g8a9822a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
GyroBase.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2008-2018 FIRST. 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 "frc/ErrorBase.h"
11 #include "frc/PIDSource.h"
12 #include "frc/interfaces/Gyro.h"
13 #include "frc/smartdashboard/SendableBase.h"
14 
15 namespace frc {
16 
21 class GyroBase : public Gyro,
22  public ErrorBase,
23  public SendableBase,
24  public PIDSource {
25  public:
26  GyroBase() = default;
27  GyroBase(GyroBase&&) = default;
28  GyroBase& operator=(GyroBase&&) = default;
29 
30  // PIDSource interface
37  double PIDGet() override;
38 
39  void InitSendable(SendableBuilder& builder) override;
40 };
41 
42 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:20
double PIDGet() override
Get the PIDOutput for the PIDSource base object.
Base class for most objects.
Definition: ErrorBase.h:74
GyroBase is the common base class for Gyro implementations such as AnalogGyro.
Definition: GyroBase.h:21
Definition: SendableBase.h:19
Interface for yaw rate gyros.
Definition: Gyro.h:15
Definition: SendableBuilder.h:23