nn::hid::CTR::PadReader::Read Member Function| Name | Description | |
|---|---|---|
| out | pBufs | Receives sampling data, starting with the newest data. |
| out | pReadLen | Number of data samples that were read. |
| in | bufLen | Specifies the number of data samples to read into pBufs. |
Reads sampling data from the gamepad, starting with the latest samples. Any previously loaded data is not read.
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.
The maximum number of data samples that can be loaded is the seven most recent instances (MAX_READ_NUM).
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 Change | Probability X (%) | Probability Y (%) |
|---|---|---|
| -3 | 0.00000585347 | 0.00000585347 |
| -2 | 0.0001778 | 0.0001778 |
| -1 | 0.0035411 | 0.0035411 |
| ±0 | 99.949837 | 99.949837 |
| -1 | 0.0035411 | 0.0035411 |
| -2 | 0.0001778 | 0.0001778 |
| -3 | 0.00000585347 | 0.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.
CONFIDENTIAL