Difference between revisions of "Touchscreen Calibration"

From uGFX Wiki
Jump to: navigation, search
(Tolerance)
Line 1: Line 1:
 
Certain user input devices such as touchscreens needs to be calibrated. For this, the GINPUT module provides a calibration dialog. The calibration uses a tree-point algorithm. Three calibration points (cross hairs) will show up, one after another. Each of the crosses needs to be pressed as precisely as possible. At the end a fourth calibration cross will appear in the center of the screen. This last calibration point is used to test whether the calibration was successful. If the difference between the internal read-out of the touch coordinate and the expected result is too big the process will be restarted automatically. See [[Touchscreen_Calibration#Tolerance|Tolerance]] for more information.
 
Certain user input devices such as touchscreens needs to be calibrated. For this, the GINPUT module provides a calibration dialog. The calibration uses a tree-point algorithm. Three calibration points (cross hairs) will show up, one after another. Each of the crosses needs to be pressed as precisely as possible. At the end a fourth calibration cross will appear in the center of the screen. This last calibration point is used to test whether the calibration was successful. If the difference between the internal read-out of the touch coordinate and the expected result is too big the process will be restarted automatically. See [[Touchscreen_Calibration#Tolerance|Tolerance]] for more information.
 +
 +
By default the calibration dialog will pop-up on every power-up unless the GINPUT module could load valid calibration data. See [[Touchscreen_Calibration#Storing calibration values|Storing calibration values]] for more information.
  
 
== Tolerance ==
 
== Tolerance ==
Line 10: Line 12:
 
== Extreme coordinates ==
 
== Extreme coordinates ==
 
By default the cross-hairs of the calibration dialog will show with about 25% distance to the display border. However, for some touchscreen types it is better to place the calibration cross-hairs directly at the corners of the display. To enable this feature ''GINPUT_MOUSE_MAX_CALIBRATION_ERROR'' may be set to ''TRUE'' in the touchscreen drivers board file.
 
By default the cross-hairs of the calibration dialog will show with about 25% distance to the display border. However, for some touchscreen types it is better to place the calibration cross-hairs directly at the corners of the display. To enable this feature ''GINPUT_MOUSE_MAX_CALIBRATION_ERROR'' may be set to ''TRUE'' in the touchscreen drivers board file.
 +
 +
== Storing calibration values ==
 +
It is possible to save calibration data. This allows to calibrate a device once and load the corresponding calibration data on each startup

Revision as of 23:12, 19 June 2015

Certain user input devices such as touchscreens needs to be calibrated. For this, the GINPUT module provides a calibration dialog. The calibration uses a tree-point algorithm. Three calibration points (cross hairs) will show up, one after another. Each of the crosses needs to be pressed as precisely as possible. At the end a fourth calibration cross will appear in the center of the screen. This last calibration point is used to test whether the calibration was successful. If the difference between the internal read-out of the touch coordinate and the expected result is too big the process will be restarted automatically. See Tolerance for more information.

By default the calibration dialog will pop-up on every power-up unless the GINPUT module could load valid calibration data. See Storing calibration values for more information.

Tolerance

The calibration dialog will perform a check to verify that the calibration process was successful by presenting a fourth calibration point at the center of the screen. When the tolerance between the expected coordinates and the actual read-outs is too big the calibration dialog will restart itself. It's the responsibility of the touchscreen driver to specify how big the tolerance may be. Hence this value can be modified in the board file. Note that there are two tolerance settings: One for the pen mode and one for the finger mode. The values specified are pixels.

#define GMOUSE_ADS7843_PEN_CALIBRATE_ERROR		8
#define GMOUSE_ADS7843_FINGER_CALIBRATE_ERROR	       14

Extreme coordinates

By default the cross-hairs of the calibration dialog will show with about 25% distance to the display border. However, for some touchscreen types it is better to place the calibration cross-hairs directly at the corners of the display. To enable this feature GINPUT_MOUSE_MAX_CALIBRATION_ERROR may be set to TRUE in the touchscreen drivers board file.

Storing calibration values

It is possible to save calibration data. This allows to calibrate a device once and load the corresponding calibration data on each startup