WPILibC++ 2024.3.2
|
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. More... | |
BuiltInAccelerometer (BuiltInAccelerometer &&)=default | |
BuiltInAccelerometer & | operator= (BuiltInAccelerometer &&)=default |
void | SetRange (Range range) |
Set the measuring range of the accelerometer. More... | |
double | GetX () |
double | GetY () |
double | GetZ () |
void | InitSendable (wpi::SendableBuilder &builder) override |
Initializes this Sendable object. More... | |
Public Member Functions inherited from wpi::Sendable | |
virtual | ~Sendable ()=default |
virtual void | InitSendable (SendableBuilder &builder)=0 |
Initializes this Sendable object. More... | |
Public Member Functions inherited from wpi::SendableHelper< BuiltInAccelerometer > | |
SendableHelper (const SendableHelper &rhs)=default | |
SendableHelper (SendableHelper &&rhs) | |
SendableHelper & | operator= (const SendableHelper &rhs)=default |
SendableHelper & | operator= (SendableHelper &&rhs) |
Additional Inherited Members | |
Protected Member Functions inherited from wpi::SendableHelper< BuiltInAccelerometer > | |
SendableHelper ()=default | |
~SendableHelper () | |
Built-in accelerometer.
This class allows access to the roboRIO's internal accelerometer.
Accelerometer range.
Enumerator | |
---|---|
kRange_2G | 2 Gs max. |
kRange_4G | 4 Gs max. |
kRange_8G | 8 Gs max. |
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. |