nn::hid::CTR::AccelerometerReader Classclass AccelerometerReader : private ADLFireWall::NonCopyable
Class for loading sampling data from the accelerometers.
Note: The accelerometers have an average sampling cycle of 10 ms.
Accelerometers are sampled after an instance of this class is generated, so sampling data can be read 10 ms after generating a class instance.
You can obtain processed output values using the nn::hid::AccelerometerReader::EnableOffset function and the nn::hid::AccelerometerReader::EnableAxisRotation function. Depending on the processing, the accelerometer can output values as if it were positioned at a tilt, or the state that is treated as level can be adjusted. For details, see the various function references.
The axes of the accelerometer are as follows:
X+: Leftward direction of +Control Pad
Y+: Into the Touch Screen
Z+: Upward direction of +Control Pad
AccelerometerReader
|
Constructor. | |
|---|---|---|
~AccelerometerReader
|
Destructor. | |
Read
|
Loads sampling data from the accelerometers in order, starting with the newest samples. Does not load any data that was previously loaded. | |
ReadLatest
|
Loads the newest sampling data from the accelerometers. Unlike the nn::hid::CTR::AccelerometerReader::Read function, this function can load the same sampling data more than once. |
|
GetSensitivity
|
Gets the settings for sensitivity and play tolerance for the change in acceleration between samples. | |
SetSensitivity
|
Sets the play tolerance for the change in acceleration between samples and sets the sensitivity. | |
| ConvertToAcceleration | Converts the raw sampling data from the accelerometers into acceleration values (in g's). | |
| EnableAxisRotation | Enables Axial rotation of the accelerometer. | |
| DisableAxisRotation | Disables Axial rotation of the accelerometer. | |
| IsEnableAxisRotation | Checks whether Axial rotation is enabled or disabled for the accelerometer. | |
| SetAxisRotationMatrix | Specifies the rotation matrix that will be used for axial rotation of the accelerometer's sampling data. | |
| GetAxisRotationMatrix | Gets the specified rotation matrix that will be used for axial rotation of the accelerometer's sampling data. | |
| ResetAxisRotationMatrix | Initializes the rotation matrix that will be used for transforming the accelerometer's sampling data. | |
| EnableOffset | Enables the offset of the accelerometer. | |
| DisableOffset | Disables the accelerometer's offset. | |
| IsEnableOffset | Checks whether Offset is enabled or disabled for the accelerometer. | |
| SetOffsetFromBaseStatus | Sets the offset value for the accelerometer. | |
| SetOffset | Specifies the offset value for the accelerometer. | |
| GetOffset | Gets the offset value for the accelerometer. | |
| ResetOffset | Resets the offset value for the accelerometer to the default. |
ADLFireWall::NonCopyable
nn::hid::CTR::AccelerometerReader
CONFIDENTIAL