Calibrate a touchscreen
- -a alg
- Specify the calibration algorithm. Valid algorithms are 3 and 4. Default value is 3.
- -b val
- Specify the touch point acceptance variance (range 0 - 2000). Enabling this will force bound checking on touch points.
- Don't run if a configuration file already exists at /etc/system/config/calib.$(hostname).
- -d w,h
- The width and height of the screen to be calibrated. If you don't specify this option, calib attempts to get this information from the hardware.
- -f file
- The name and location of a calibration file to create instead of the default at /etc/system/config/calib.$hostname.
- -l limit
- Limit the number of samples for each touch point. Default value is 15.
- -o offset
- Offset for crosshair position, which you can use to tweak calibration. Applicable only with 4-point calibration.
- The Origin. Touch screen origin (0,0) is at the lower right side. Default is upper left corner.
- -p x, y
- The offset position of the calibration region.
- Supress prompts (no text is displayed on screen). Prompts are on by default.
- -s server
- The server node or the device name.
- Use small touch targets. Default is large.
- -t timer
- The done button timer value. Default value is 10.
- Verbose output.
- -x x
- The initial x position.
- -y y
- The initial y position.
The calib utility is used to calibrate a touchscreen. Once the touchscreen is successfully configured (i.e. you've created an input.node file), it must be calibrated. The calib utility saves a configuration file at /etc/system/config/calib.$hostname. For information about this file format, see the "Calibration file format" section of the "Writing an Input Device Driver" chapter of the Input DDK documentation.
To invoke the calibration screen:
- Start Photon.
- Run calib.
- Touch the bullseye target on the screen.
- Touch the Press to Complete Calibration button to finish calibration.
Calibrate a quarter of a standard 640x480 VGA screen (the driver will cover only part of the screen):
calib -d 320,240