Note: This is an old calibration program written many years ago and is shown here as a temporary introduction to user written calibration. When we officially release 4.1.10 we hope to have a new calibration program available for download at which point this documentation will be updated.
This section describes the process required for an application to handle its own calibration.
Calibration can be performed in 1 of 3 ways:
This section covers option 3 above. However, before you embark on this method of calibration you should checkout the full characteristics of TBcalib. The program allows for different calibration images and caters for all the subtle (and somewhat complex) issues that need to be considered when calibrating a device. We highly recommend you use TBcalib to handle calibration. Nevertheless, you are able to handle your own calibration if you wish. Please note that example calibration source code is available from Touch-Base. You should make yourself familiar with this code before proceeding.
An overview of the calibration sequence for UPDD is as follows:
The simplest way to write calibration information to the registry is to use TBApiSetCalibrationStyle. This API call can be used to change the settings for an existing style, or to create a new style.
The example program ‘CalibrationSample’ handles calibration on a single device with the following characteristics:
Calibration Sample Callback routine
The key processing of this program is located in the callback routine (this is registered to receive co-ordinate data). Check the full source code in module CalibrationSampleDlg.cpp for more details.
The calibration style may not exist, i.e. it need not have been previously defined by the UPDD Console, Calibration, Style. To define a new style, remove the call to TBApiGetCalibrationStyleByName and simply pass TBNEW_STYLE as the style handle (i.e. the second) argument to TBApiSetCalibrationStyle.
Values supplied in thePoints are the raw co-ordinates recorded. Note that the calibration reference points are re-calculated by this function.
A number of API calls support calibration functionality:
Calibration Style Structure
This structure is used in many of the calibration API calls and can be found in the header file TBapi.h (struct _CalStyle) or Tbapi.bas (Co-ordinateData Type).
There are currently no API’s to write the calibration data to eeprom althought these may be implemented in a future release. Where UPDD supports writing calibration data to a controller’s eeprom (as documented here) you can call the tbcalib command line interface with the parameter eepromwrite, e.g. tbcalib eepromwrite.
For further information or technical assistance please email the technical support team at firstname.lastname@example.org.