WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
Gyro.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2014-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 
13 class Gyro {
14  public:
15  virtual ~Gyro() = default;
16 
25  virtual void Calibrate() = 0;
26 
32  virtual void Reset() = 0;
33 
46  virtual float GetAngle() const = 0;
47 
55  virtual double GetRate() const = 0;
56 };
virtual void Calibrate()=0
Calibrate the gyro by running for a number of samples and computing the center value.
virtual void Reset()=0
Reset the gyro.
virtual float GetAngle() const =0
Return the actual angle in degrees that the robot is currently facing.
Interface for yaw rate gyros.
Definition: Gyro.h:13
virtual double GetRate() const =0
Return the rate of rotation of the gyro.