+2002-08-29 Douglas Lowder <dlowder@earthlink.net>
+- Added tests/ts_print_raw.c to print raw uncalibrated touchscreen events
+ (useful for debugging)
+
2002-07-11 Douglas Lowder <dlowder@earthlink.net>
- Added code in src/ts_read_raw.c to handle reading events from the mk712
touchscreen driver on the Hitachi Webpad.
#!/bin/sh
-# $Id: autogen.sh,v 1.1.1.1 2001/12/22 21:12:06 rmk Exp $
+# $Id: autogen.sh,v 1.2 2002/08/29 20:40:09 dlowder Exp $
+echo -n "Libtoolize..."
libtoolize --force --copy
+echo "Done."
+echo -n "Aclocal..."
aclocal
+echo "Done."
+echo -n "Autoheader..."
autoheader
+echo "Done."
+echo -n "Automake..."
automake --add-missing --copy
+echo "Done."
+echo -n "Autoconf..."
autoconf
-./configure $*
+echo "Done."
+#./configure $*
+echo "Now you can do ./configure, make, make install."
# This file is placed under the LGPL. Please see the file
# COPYING for more details.
#
-# $Id: Makefile.am,v 1.2 2002/06/17 17:21:43 dlowder Exp $
+# $Id: Makefile.am,v 1.3 2002/08/29 20:40:09 dlowder Exp $
#
CFLAGS := $(CFLAGS) $(DEBUGFLAGS) $(INPUTAPIFLAG)
INCLUDES = -I$(top_srcdir)/src
-bin_PROGRAMS = ts_test ts_calibrate ts_print
+bin_PROGRAMS = ts_test ts_calibrate ts_print ts_print_raw
ts_test_SOURCES = ts_test.c fbutils.c font_8x8.c font_8x16.c
ts_test_LDADD = $(top_builddir)/src/libts.la
ts_print_SOURCES = ts_print.c
ts_print_LDADD = $(top_builddir)/src/libts.la
+ts_print_raw_SOURCES = ts_print_raw.c
+ts_print_raw_LDADD = $(top_builddir)/src/libts.la
+
ts_calibrate_SOURCES = ts_calibrate.c fbutils.c font_8x8.c font_8x16.c
ts_calibrate_LDADD = $(top_builddir)/src/libts.la
--- /dev/null
+/*
+ * tslib/src/ts_print.c
+ *
+ * Derived from tslib/src/ts_test.c by Douglas Lowder
+ * Just prints touchscreen events -- does not paint them on framebuffer
+ *
+ * This file is placed under the GPL. Please see the file
+ * COPYING for more details.
+ *
+ * Basic test program for touchscreen library.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <sys/fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+#include <sys/time.h>
+
+#include "tslib.h"
+
+
+int main()
+{
+ struct tsdev *ts;
+ int x, y;
+ char *tsdevice=NULL;
+
+ if( (tsdevice = getenv("TSLIB_TSDEVICE")) != NULL ) {
+ ts = ts_open(tsdevice,0);
+ } else {
+#ifdef USE_INPUT_API
+ ts = ts_open("/dev/input/event0", 0);
+#else
+ ts = ts_open("/dev/touchscreen/ucb1x00", 0);
+#endif /* USE_INPUT_API */
+ }
+
+ if (!ts) {
+ perror("ts_open");
+ exit(1);
+ }
+
+ if (ts_config(ts)) {
+ perror("ts_config");
+ exit(1);
+ }
+
+ while (1) {
+ struct ts_sample samp;
+ int ret;
+
+ ret = ts_read_raw(ts, &samp, 1);
+
+ if (ret < 0) {
+ perror("ts_read");
+ exit(1);
+ }
+
+ if (ret != 1)
+ continue;
+
+ printf("%ld.%06ld: %6d %6d %6d\n", samp.tv.tv_sec, samp.tv.tv_usec, samp.x, samp.y, samp.pressure);
+
+ }
+}