nn::hid::CTR::GyroscopeReader Class

Syntax

class GyroscopeReader : private ADLFireWall::NonCopyable

Description

Class for loading sampling data from the gyro sensor.

Note: The gyro sensor has an average sampling cycle of 10 ms.

Because gyro sensor sampling takes place after an instance of this class has been generated, the loading of sampling data occurs 10 ms after the class instance has been generated. Furthermore, because an instance of AccelerometerReader is maintained internally, when the gyro sensor is used the accelerometer is also automatically activated.

You can obtain processed output values using the nn::hid::GyroscopeReader::EnableAxisRotation function. By processing the data you can obtain output values as if the sensor was positioned at an incline. For details, see the function reference.

The axes of the gyro sensor are as follows:
X+: Leftward direction of +Control Pad
Y+: Into the Touch Screen
Z+: Upward direction of +Control Pad

Member Constants

S GYROSCOPE_DRIFT_COUNT_MAX The maximum number for the drift correction count. 2 to the nth power.

Member Functions

GyroscopeReader Constructor.
~GyroscopeReader Destructor.
Read Loads sampling data from the gyro sensor, starting with the latest data. Does not load any data that was previously loaded.
ReadLatest Loads the latest sampling data from the gyro sensor. This function, unlike the nn::hid::CTR::GyroscopeReader::Read function, can load the same sampling data more than once.
Reset Initializes the internal state.
SetAngle Uses arbitrary values to reset angle in the GyroscopeStatus structure, which is obtained by the Read function.
SetDirection Uses arbitrary values to reset direction in the GyroscopeStatus structure, which is obtained by the Read function.
SetDirectionMagnification Sets the angular speed value that will be used when internally calculating direction in the GyroscopeStatus structure, which is obtained by the Read function.
SetAngleMagnification Sets the scaling to be applied in each direction when calculating angular speed.
EnableZeroPlay Enables the zero-point tolerance.
DisableZeroPlay Disables the zero-point play.
IsEnableZeroPlay Checks whether zero-point play is enabled.
GetZeroPlayEffect Gets the effective extent of the zero-point play correction process.
SetZeroPlayParam Sets the zero-point (stationary) play.
GetZeroPlayParam Gets the zero-point play.
ResetZeroPlayParam Initializes zero-point play.
EnableZeroDrift Enables zero-point drift correction.
DisableZeroDrift Disables zero-point drift correction.
IsEnableZeroDrift Checks whether zero-point drift correction is enabled.
GetZeroDriftEffect Gets the effective extent of zero-point drift correction.
ResetZeroDriftMode Initializes the zero-point drift correction mode.
SetZeroDriftMode Sets the zero-point drift correction mode.
GetZeroDriftMode Gets the zero-point drift correction mode.
EnableAccRevise Enables acceleration correction.
DisableAccRevise Disables acceleration correction.
IsEnableAccRevise Checks whether acceleration correction is enabled.
GetAccReviseEffect Gets the effective extent of acceleration correction.
SetAccReviseParam Sets the extent of acceleration correction.
GetAccReviseParam Gets the extent of acceleration correction.
ResetAccReviseParam Initializes the extent of acceleration correction.
EnableAxisRotation Enables Axial rotation of the gyro sensor.
DisableAxisRotation Disables Axial rotation of the gyro sensor.
IsEnableAxisRotation Checks whether axial rotation is enabled or disabled for the gyro sensor.
SetAxisRotationMatrix Sets the rotation matrix that will be used for axial rotation of the gyro sensor.
GetAxisRotationMatrix Gets the rotation matrix that will be used for axial rotation of the gyro sensor.
ResetAxisRotationMatrix Initializes the rotation matrix that will be used for axial rotation of the gyro sensor. At this time the rotation matrix is set to a nn::math::MTX34 identity matrix, which is equivalent to when axial rotation is disabled.

Class Hierarchy

ADLFireWall::NonCopyable
  nn::hid::CTR::GyroscopeReader


CONFIDENTIAL