nn::hid::CTR::GyroscopeReader::GyroscopeReader Constructor

Syntax

GyroscopeReader(
     AccelerometerReader * pAccelerometerReader = NULL,
     Gyroscope & gyroscope = GetGyroscope()
);

Parameters

Name Description
in pAccelerometerReader Specify a reference to an instance of AccelerometerReader to use the referenced AccelerometerReader output value as the basis for correction. NULL is passed as the default, in which case correction is based on the internally stored default AccelerometerReader.
in gyroscope A Gyroscope instance that is used internally. There is no need to specify this explicitly.

Description

Constructor.

Initialize with the nn::hid::CTR::Initialize function before creating an instance.

This function calls the Reset function. For more information about the initial state after creation, see the Reset function.
Note: In some cases immediately after creation of the first instance, as much as 160 ms is required to attain stability before the application can start sampling. Please take note of this. 

The class stores an instance of AccelerometerReader. The lifespan of that instance is the same as the lifespan of GyroscopeReader. In other words, AccelerometerReader instances are created or destroyed when GyroscopeReader instances are created or destroyed.

Revision History

2011/08/30
Explained that this calls the Reset function.
2010/10/20
Initial version.

CONFIDENTIAL