-
#include "CirquePinnacle.h"
-
bool PinnacleTouch::calibrate(bool run = true, bool tap = true, bool trackError = true, bool nerd = true, bool background = true);
Set calibration parameters when the Pinnacle ASIC calibrates itself. This function only applies to
PINNACLE_RELATIVE
orPINNACLE_ABSOLUTE
mode, otherwise ifsetDataMode()
is givenPINNACLE_ANYMEAS
, then this function will do nothing.Note
According to the datasheet, calibration of the sensor takes about 100 milliseconds. This function will block until calibration is complete (if
run
istrue
). It is recommended for typical applications to leave all optional parameters in their default states.- Parameters:¶
- bool run = true¶
If
true
, this function forces a calibration of the sensor. Iffalse
, this function just writes the following parameters to the Pinnacle ASIC’s “CalConfig1” register.- bool tap = true¶
Enable dynamic tap compensation? Default is
true
.- bool trackError = true¶
Enable dynamic track error compensation? Default is
true
.- bool nerd = true¶
Enable dynamic NERD compensation? Default is
true
. This parameter has something to do with palm detection/compensation.- bool background = true¶
Enable dynamic background compensation? Default is
true
.
- Returns:¶
false
If
setDataMode()
is not set toPINNACLE_RELATIVE
orPINNACLE_ABSOLUTE
.If the calibration
run
timed out after 100 milliseconds.
true
If
setDataMode()
is not givenPINNACLE_RELATIVE
orPINNACLE_ABSOLUTE
and the calibration is notrun
.If the calibration
run
successfully finishes.