mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
31 lines
863 B
C++
31 lines
863 B
C++
/*----------------------------------------------------------------------------*/
|
|
/* Copyright (c) FIRST 2014. All Rights Reserved. */
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
|
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
|
|
/*----------------------------------------------------------------------------*/
|
|
#pragma once
|
|
|
|
#include "SensorBase.h"
|
|
|
|
/**
|
|
* Built-in accelerometer.
|
|
*
|
|
* This class allows access to the RoboRIO's internal accelerometer.
|
|
*/
|
|
class BuiltInAccelerometer : public SensorBase
|
|
{
|
|
public:
|
|
enum Range
|
|
{
|
|
kRange_2G = 0x00,
|
|
kRange_4G = 0x01,
|
|
kRange_8G = 0x02,
|
|
};
|
|
|
|
BuiltInAccelerometer(Range range = kRange_2G);
|
|
virtual ~BuiltInAccelerometer();
|
|
virtual double GetX() const;
|
|
virtual double GetY() const;
|
|
virtual double GetZ() const;
|
|
};
|