RE: Touch Input Driver port 3.3.6 - 4.x

2005-05-25 Thread Veikko Werner
There are no default Xmin/Max Ymin/Max values for any resistive touch devices.
A good possibility would be to include a calibration routine into the driver if 
possible.

Veikko

 -Original Message-
 From: Sergey Babkin [mailto:[EMAIL PROTECTED]
 Sent: Saturday, May 21, 2005 2:52 AM
 To: devel@XFree86.Org
 Subject: Re: Touch Input Driver port 3.3.6 - 4.x
 
 
 Fred Gleason wrote:
  
  On Wednesday 18 May 2005 18:48, Quentin Olson wrote:
   I have the source for an old input driver that was 
 written for XFree86
   3.3.6 that I would like to use under 4.x (4.5). Is there any
   documentation on what is required, howtos, etc.?
  
  Which touch hardware in particular are you trying to 
 support?  A driver for
  the USB-based ELOs was just recently added.
 
 BTW, the serial ELO driver could benefit by setting the defaults
 X and Y ranges correctly. They are something like 300 to 3700,
 same as for USB. I can look up the exact values in the ELO docs
 if anybody cares.
 
 Or maybe they are already correct now - I haven't checked it
 for a while.
 
 -SB
 ___
 Devel mailing list
 Devel@XFree86.Org
 http://XFree86.Org/mailman/listinfo/devel
 

___
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel


RE: RE: Touch Input Driver port 3.3.6 - 4.x

2005-05-25 Thread Veikko Werner
Sergey,

but anyway if your touchscreen is mounted in the wrong way the pointer will 
then not follow your fingertips

this is from xf86Elo.c

/*
 ***
 *
 * Default constants.
 *
 ***
 */
#define ELO_MAX_TRIALS  3   /* Number of timeouts waiting for a 
*/
/* pending reply.   
*/
#define ELO_MAX_WAIT10  /* Max wait time for a reply (microsec) 
*/
#define ELO_UNTOUCH_DELAY   5   /* 100 ms   
*/
#define ELO_REPORT_DELAY1   /* 40 ms or 25 motion reports/s 
*/
#define ELO_LINK_SPEED  B9600   /* 9600 Bauds   
*/
#define ELO_PORT/dev/ttyS1

#define DEFAULT_MAX_X   3000
#define DEFAULT_MIN_X   600
#define DEFAULT_MAX_Y   3000
#define DEFAULT_MIN_Y   600


 -Original Message-
 From: Sergey Babkin [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 25, 2005 2:16 PM
 To: Veikko Werner; [EMAIL PROTECTED]; devel@XFree86.Org
 Subject: Re: RE: Touch Input Driver port 3.3.6 - 4.x
 
 
 From: Veikko Werner [EMAIL PROTECTED]
 
 
 There are no default Xmin/Max Ymin/Max values for any 
 resistive touch devices.
 A good possibility would be to include a calibration routine 
 into the driver if possible.
 
 There are manufacturer-specified ranges for both
 ELO and Microtouch (though I don't know if they
 are using the resistive technology). They may
 be not perfectly precise but they are good
 enough for the precision of a finger touch -
 since the fingers are much bigger than pixels,
 you can't touch a particular pixel anyway.
 For ELO the range is around from 300 to 3700
 I don't remember the exact numbers, for 
 Microtouch it's from 0 to 16K. 
 
 The drivers have the defaults compiled into them
 which can be changed from XF86Config. The problem
 is that the ELO driver has (had?) it's defaults
 set to 0-16K as well, so without an explicit
 setting in the config file it does not work
 in any useful manner.
 
 -SB
 
  -Original Message-
  From: Sergey Babkin [mailto:[EMAIL PROTECTED]
  Sent: Saturday, May 21, 2005 2:52 AM
  To: devel@XFree86.Org
  Subject: Re: Touch Input Driver port 3.3.6 - 4.x
  
  
  Fred Gleason wrote:
   
   On Wednesday 18 May 2005 18:48, Quentin Olson wrote:
I have the source for an old input driver that was 
  written for XFree86
3.3.6 that I would like to use under 4.x (4.5). Is there any
documentation on what is required, howtos, etc.?
   
   Which touch hardware in particular are you trying to 
  support?  A driver for
   the USB-based ELOs was just recently added.
  
  BTW, the serial ELO driver could benefit by setting the defaults
  X and Y ranges correctly. They are something like 300 to 3700,
  same as for USB. I can look up the exact values in the ELO docs
  if anybody cares.
  
  Or maybe they are already correct now - I haven't checked it
  for a while.
  
  -SB
  ___
  Devel mailing list
  Devel@XFree86.Org
  http://XFree86.Org/mailman/listinfo/devel
  
 
 

___
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel


Re: magictouch touch screen driver

2005-05-25 Thread bruno schwander
I tried using the screenInfo everytime the x,y position is scaled and
returned, but that does not seem to help. I do not know how to support
screen resolition changes. If anybody has an idea, let me know.

The driver is basically a slightly massaged dmc driver, there is probably
still some stuff to clean. Here it is as a shell archive (don't know it
the maillist rejects attachments...)

bruno

On Tue, 24 May 2005, David Dawes wrote:

 On Tue, May 24, 2005 at 08:05:43AM -0700, bruno schwander wrote:
 I have my driver for the serial MagicTouch touchscreen working. There is
 just one thing that I am not sure of: if the resolution is changed
 dynamically (by some program running fullscreen for example), the scaling
 is off. How do I find if the resolution has changed ? Right now, I check
 the screen size when the device inits, and store that away. Should I
 instead use the actual screen size everytime through screenInfo ? Is that
 safe ? Also, how can I twiddle the DTR, RTS lines, I do not find some
 abstraction for that...

 Maybe xf86SetSerialModemState() will let you twiddle the DTR, RTS lines.
 I haven't looked at that stuff in a while.  Perhaps someone else can give
 you some answers to your other questions.

 then, how do I submit the driver ? send it to this list ?

 You can either send it here, or submit it at bugs.xfree86.org.

 David
 ___
 Devel mailing list
 Devel@XFree86.Org
 http://XFree86.Org/mailman/listinfo/devel





# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering sh file.  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#   magictouch
#   magictouch/Imakefile
#   magictouch/xf86MagicTouch.c
#   magictouch/magictouch.man
#   magictouch/xf86MagicTouch.h
#
echo c - magictouch
mkdir -p magictouch  /dev/null 21
echo x - magictouch/Imakefile
sed 's/^X//' magictouch/Imakefile  'END-of-magictouch/Imakefile'
X#define IHaveModules
X#include Server.tmpl
X
XSRCS = xf86MagicTouch.c
XOBJS = xf86MagicTouch.o
X
XDRIVER = magictouch
X
XINCLUDES = -I. -I$(XF86COMSRC) -I$(XF86SRC)/loader -I$(XF86OSSRC) \
X   -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC)
X
X#if MakeHasPosixVariableSubstitutions
XSubdirLibraryRule($(OBJS))
X#endif
X
XModuleObjectRule()
X
XObjectModuleTarget($(DRIVER),$(OBJS))
X
XInstallObjectModule($(DRIVER),$(MODULEDIR),input)
X
X#if !defined(XF86DriverSDK)
XInstallModuleManPage($(DRIVER))
X#endif
X
XDependTarget()
X
XInstallDriverSDKObjectModule($(DRIVER),$(DRIVERSDKMODULEDIR),input)
END-of-magictouch/Imakefile
echo x - magictouch/xf86MagicTouch.c
sed 's/^X//' magictouch/xf86MagicTouch.c  
'END-of-magictouch/xf86MagicTouch.c'
X/*
X * Copyright (c) 2005 Bruno Schwander
X * Author: Bruno Schwander [EMAIL PROTECTED]
X * Template driver used: dmc:
X *
X * Copyright (c) 1999  Machine Vision Holdings Incorporated
X * Author: Mayk Langer [EMAIL PROTECTED]
X *
X * Template driver used: Copyright (c) 1998  Metro Link Incorporated
X *
X  * Permission is hereby granted, free of charge, to any person obtaining a
X * copy of this software and associated documentation files (the Software),
X * to deal in the Software without restriction, including without limitation
X * the rights to use, copy, modify, merge, publish, distribute, sublicense,
X * and/or sell copies of the Software, and to permit persons to whom the
X * Software is furnished to do so, subject to the following conditions:
X *
X * The above copyright notice and this permission notice shall be included in
X * all copies or substantial portions of the Software.
X *
X * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
X * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
X * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
X * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
X * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
X * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
X * SOFTWARE.
X *
X */
X
X#define _MGT_C_
X
X#include misc.h
X#include xf86.h
X#define NEED_XF86_TYPES
X#include xf86_ansic.h
X#include xf86_OSproc.h
X#include xf86Xinput.h
X#include xisb.h
X#include exevents.h
X
X#include xf86MagicTouch.h
X
XInputDriverRec MGT = {
X1,
Xmagictouch,
XNULL,
XMGTPreInit,
X/*MGTUnInit*/NULL,
XNULL,
X0
X};
X
X
X
X#ifdef XFree86LOADER
X
Xstatic XF86ModuleVersionInfo VersionRec =
X{
X   magictouch,
X   MODULEVENDORSTRING,
X   MODINFOSTRING1,
X   MODINFOSTRING2,
X   XF86_VERSION_CURRENT,
X   1, 0, 0,
X   ABI_CLASS_XINPUT,
X   ABI_XINPUT_VERSION,
X   MOD_CLASS_XINPUT,
X   {0, 0, 0, 0}/* signature, to be patched 
into the file by
X