2015-11-06 12:05:40 -08:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2018-01-02 09:20:21 -08:00
|
|
|
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
|
2015-11-06 12:05:40 -08:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
2016-01-02 03:02:34 -08:00
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
2015-11-06 12:05:40 -08:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2016-01-02 03:02:34 -08:00
|
|
|
|
2015-11-06 12:05:40 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "PIDSource.h"
|
2016-05-20 17:30:37 -07:00
|
|
|
#include "SensorBase.h"
|
2015-11-06 12:05:40 -08:00
|
|
|
#include "interfaces/Gyro.h"
|
|
|
|
|
|
2016-11-01 22:33:12 -07:00
|
|
|
namespace frc {
|
|
|
|
|
|
2015-11-06 12:05:40 -08:00
|
|
|
/**
|
|
|
|
|
* GyroBase is the common base class for Gyro implementations such as
|
|
|
|
|
* AnalogGyro.
|
|
|
|
|
*/
|
2017-12-04 23:28:33 -08:00
|
|
|
class GyroBase : public Gyro, public SensorBase, public PIDSource {
|
2015-11-06 12:05:40 -08:00
|
|
|
public:
|
|
|
|
|
// PIDSource interface
|
|
|
|
|
double PIDGet() override;
|
|
|
|
|
|
2017-12-04 23:28:33 -08:00
|
|
|
void InitSendable(SendableBuilder& builder) override;
|
2015-11-06 12:05:40 -08:00
|
|
|
};
|
2016-11-01 22:33:12 -07:00
|
|
|
|
|
|
|
|
} // namespace frc
|