WPILibC++  2020.3.2-60-g3011ebe
GyroBase.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2008-2019 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/Sendable.h"
14 #include "frc/smartdashboard/SendableHelper.h"
15 
16 namespace frc {
17 
22 class GyroBase : public Gyro,
23  public ErrorBase,
24  public PIDSource,
25  public Sendable,
26  public SendableHelper<GyroBase> {
27  public:
28  GyroBase() = default;
29  GyroBase(GyroBase&&) = default;
30  GyroBase& operator=(GyroBase&&) = default;
31 
32  // PIDSource interface
39  double PIDGet() override;
40 
41  void InitSendable(SendableBuilder& builder) override;
42 };
43 
44 } // namespace frc
frc::PIDSource
PIDSource interface is a generic sensor source for the PID class.
Definition: PIDSource.h:20
frc::Gyro
Interface for yaw rate gyros.
Definition: Gyro.h:15
frc::ErrorBase
Base class for most objects.
Definition: ErrorBase.h:104
frc::Sendable
Interface for Sendable objects.
Definition: Sendable.h:17
frc
A class that enforces constraints on the differential drive kinematics.
Definition: PDPSim.h:16
frc::GyroBase::PIDGet
double PIDGet() override
Get the PIDOutput for the PIDSource base object.
frc::GyroBase
GyroBase is the common base class for Gyro implementations such as AnalogGyro.
Definition: GyroBase.h:22
frc::GyroBase::InitSendable
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
frc::SendableHelper
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:28
frc::SendableBuilder
Definition: SendableBuilder.h:23