00001 /* 00002 * File Name: calibrate.h 00003 */ 00004 00005 /* 00006 * This file is part of gtktscal. 00007 * 00008 * gtktscal is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation, either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * gtktscal is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 */ 00021 00022 /* 00023 * This code is originally from: 00024 * 00025 * tslib/tests/ts_calibrate.c 00026 * 00027 * Copyright (C) 2001 Russell King. 00028 * 00029 * Modifications: 00030 * 00031 * Copyright (C) 2008 iRex Technologies B.V. 00032 */ 00033 00034 #define CAL_XK 0 00035 #define CAL_XX 1 00036 #define CAL_XY 2 00037 #define CAL_YK 3 00038 #define CAL_YX 4 00039 #define CAL_YY 5 00040 #define CAL_S 6 00041 00042 #define NR_POINTS 5 00043 typedef struct { 00044 int x[NR_POINTS], xfb[NR_POINTS], xscr[NR_POINTS]; 00045 int y[NR_POINTS], yfb[NR_POINTS], yscr[NR_POINTS]; 00046 int a[7]; 00047 } calibration; 00048 00049 extern int perform_calibration(calibration *cal);