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 
14  public:
15  virtual ~Accelerometer() = default;
16 
17  enum Range { kRange_2G = 0, kRange_4G = 1, kRange_8G = 2, kRange_16G = 3 };
18 
25  virtual void SetRange(Range range) = 0;
26 
32  virtual double GetX() = 0;
33 
39  virtual double GetY() = 0;
40 
46  virtual double GetZ() = 0;
47 };
virtual void SetRange(Range range)=0
Common interface for setting the measuring range of an accelerometer.
virtual double GetY()=0
Common interface for getting the y axis acceleration.
Interface for 3-axis accelerometers.
Definition: Accelerometer.h:13
virtual double GetX()=0
Common interface for getting the x axis acceleration.
virtual double GetZ()=0
Common interface for getting the z axis acceleration.