WPILibC++ 2025.2.1
|
Built-in accelerometer. More...
#include <frc/BuiltInAccelerometer.h>
Public Types | |
enum | Range { kRange_2G = 0 , kRange_4G = 1 , kRange_8G = 2 } |
Accelerometer range. More... | |
Public Member Functions | |
BuiltInAccelerometer (Range range=kRange_8G) | |
Constructor. | |
BuiltInAccelerometer (BuiltInAccelerometer &&)=default | |
BuiltInAccelerometer & | operator= (BuiltInAccelerometer &&)=default |
void | SetRange (Range range) |
Set the measuring range of the accelerometer. | |
double | GetX () |
double | GetY () |
double | GetZ () |
void | InitSendable (wpi::SendableBuilder &builder) override |
Initializes this Sendable object. | |
Public Member Functions inherited from wpi::Sendable | |
virtual constexpr | ~Sendable ()=default |
Public Member Functions inherited from wpi::SendableHelper< BuiltInAccelerometer > | |
constexpr | SendableHelper (const SendableHelper &rhs)=default |
constexpr | SendableHelper (SendableHelper &&rhs) |
constexpr SendableHelper & | operator= (const SendableHelper &rhs)=default |
constexpr SendableHelper & | operator= (SendableHelper &&rhs) |
Additional Inherited Members | |
Protected Member Functions inherited from wpi::SendableHelper< BuiltInAccelerometer > | |
constexpr | SendableHelper ()=default |
constexpr | ~SendableHelper () |
Built-in accelerometer.
This class allows access to the roboRIO's internal accelerometer.
Constructor.
range | The range the accelerometer will measure |
|
default |
double frc::BuiltInAccelerometer::GetX | ( | ) |
double frc::BuiltInAccelerometer::GetY | ( | ) |
double frc::BuiltInAccelerometer::GetZ | ( | ) |
|
overridevirtual |
|
default |
void frc::BuiltInAccelerometer::SetRange | ( | Range | range | ) |
Set the measuring range of the accelerometer.
range | The maximum acceleration, positive or negative, that the accelerometer will measure. |