ReadLatest

nn::hid::CTR::PadReader::ReadLatest Member Function

Syntax

bool ReadLatest(
     PadStatus * pBuf
);

Parameters

Name Description
out pBuf Loads the sampling data.

Return Values

Returns the result of loading sampling data.

Value Description
true Read successful.
false Could not read. (The data can be loaded immediately following the first sampling that occurs after the system starts up or wakes up from sleep.)

Description

Reads the latest sampling data from the gamepad. Unlike nn::hid::CTR::PadReader::Read, it is possible to read the same sampling data.

The trigger and release values are generated with respect to the previous ReadLatest results. Use the nn::hid::CTR::PadReader::SetStickClamp function to set the appropriate play in the Circle Pad because there will be input even if it is not touched. Note that it is not possible to get the maximum distance between the input coordinates and the origin of the Circle Pad. This is because some rounding occurs during clamping. Do not use this maximum value for thresholds or the like.

Electrical fluctuations and other factors can cause variation in the X and Y coordinates input by the Circle Pad even when the pad top has not been intentionally moved. Please refer to the table below about the amounts of change and probability of change to values when the top of the pad is presumably completely fixed in position.

Circle Pad
Amount of ChangeProbability X (%)Probability Y (%)
-30.000005853470.00000585347
-20.00017780.0001778
-10.00354110.0035411
±099.94983799.949837
-10.00354110.0035411
-20.00017780.0001778
-30.000005853470.00000585347

To calculate the probability of a change in value during a given period of time, multiply the probability shown in this table by the number of sets of sampling data obtained in the given time period.

When the finger is removed from the pad and the pad top sits in its central position, the value is fixed to 0 and does not change. This is because even with some variation in value the minimum clamping value is never exceeded.

Revision History

2011/12/15
Added note about the probability and extent of variation in Circle Pad values.
2011/10/09
Revised Japanese terminology for the Circle Pad.
2010/01/07
Initial version.

CONFIDENTIAL