WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
Accelerometer.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 
10 namespace frc {
11 
16  public:
17  virtual ~Accelerometer() = default;
18 
19  enum Range { kRange_2G = 0, kRange_4G = 1, kRange_8G = 2, kRange_16G = 3 };
20 
27  virtual void SetRange(Range range) = 0;
28 
34  virtual double GetX() = 0;
35 
41  virtual double GetY() = 0;
42 
48  virtual double GetZ() = 0;
49 };
50 
51 } // namespace frc
virtual double GetX()=0
Common interface for getting the x axis acceleration.
virtual double GetZ()=0
Common interface for getting the z axis acceleration.
virtual double GetY()=0
Common interface for getting the y axis acceleration.
virtual void SetRange(Range range)=0
Common interface for setting the measuring range of an accelerometer.
Interface for 3-axis accelerometers.
Definition: Accelerometer.h:15