Re: Live Touchscreen Calibration [WAS: magictouch touch screen driver]
On Fri, Jun 10, 2005 at 10:53:47AM -0400, Fred Gleason wrote: >On Friday 10 June 2005 03:17, Veikko Werner wrote: >> actually a great thing to have, but not that easy. >> The main problem is, that the driver itself has to be disabled. > >Why so? AFAICT, we basically need two things: > >1) The ability to get 'raw' --i.e. unscaled -- data from the device during >the calibration run. > >2) Some way to set the calibration parameters of the driver based on the >results of 1). > >Both of these could be accomplished by means of adding appropriate new methods >to each driver. While I suppose this does involve effectively 'disabling' >the driver for the duration of the calibration run, this fact can be >completely hidden from the server. The server merely doesn't receive pointer >updates while calibration is in progress. > >Or am I missing something here? Sounds reasonable to me. The XInput extension could be enhanced to provide calibration requests which would be the mechanism for a calibration utility to communicate with the driver. The problem with most of the solutions I've seen for this so far is that they attempt to open a communication path directly between the driver and a calibration utility, often creating security problems. The X server already provides an authenticated mechanism for doing such things. David ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: Live Touchscreen Calibration [WAS: magictouch touch screen driver]
On Thu, Jun 09, 2005 at 04:00:54PM -0700, bruno schwander wrote: >BTW, I submitted the source for the magictouch driver on this mailling >list, is there any chance it will appear in the XFree86 tree someday ? If >a comitter needs changes, fixes to it or has questions, I'll be happy to >help as I can. I'm committing it now. Thanks for the submission. David ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: Live Touchscreen Calibration [WAS: magictouch touch screen driver]
On Friday 10 June 2005 03:17, Veikko Werner wrote: > actually a great thing to have, but not that easy. > The main problem is, that the driver itself has to be disabled. Why so? AFAICT, we basically need two things: 1) The ability to get 'raw' --i.e. unscaled -- data from the device during the calibration run. 2) Some way to set the calibration parameters of the driver based on the results of 1). Both of these could be accomplished by means of adding appropriate new methods to each driver. While I suppose this does involve effectively 'disabling' the driver for the duration of the calibration run, this fact can be completely hidden from the server. The server merely doesn't receive pointer updates while calibration is in progress. Or am I missing something here? Cheers! |-| | Frederick F. Gleason, Jr. | Director of Broadcast Software Development | | | Salem Radio Labs| |-| | Logic is a way to go wrong with confidence. | | --Robert Heinlein | | "The Notebooks of Lazarus Long" | |-| ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: Live Touchscreen Calibration [WAS: magictouch touch screen driver]
Hi, I don't think a functionality like this is really necessary. A calibration utility is started by a user once to find the mapping from touchscreen coordinates to "real" screen. In general it is a matrix doing shifting, stretching and rotating. To use scrn->currentMode is from my perspective not a hack. What can this function do more than reading these fields from screen structure. Another question is, what should be done in case of changing geometry? Automatically adjust the matrix? That is a 90% solution. What about external scaling facilities? "Letter box" display? IMHO, this should be done by userland program using DeviceControl. Best Regards Damian [EMAIL PROTECTED] wrote on 10.06.2005 01:00:54: > It would be great if you could add that... what do you mean by "live > calibration" ? > > It seems to me that calibration should be (mostly) a userland utility, > that you do not want to run everytime the Xserver starts. I probably > misunderstood what you meant. > > My only issue currently, is that if resolution changes, the mapping from > touchscreen coords to screen coords changes, thus the touchscreen driver > should be able to be notified, or query what the actual screen resolution > is. > > The trick mentioned previsously about querying the current modeline would > work, but it's a hack... something cleaner (portable, etc.) would be > nicer. > > I admit I do not know the specifics of touchpad/stylus support, but I > imagine that is also the only dynamic/live resolution support that would > be necessary ? > > Something like XFGetCurrentMonitorResolution(displayID, &width, &height) > ... > > BTW, I submitted the source for the magictouch driver on this mailling > list, is there any chance it will appear in the XFree86 tree someday ? If > a comitter needs changes, fixes to it or has questions, I'll be happy to > help as I can. > > bruno > > On Thu, 9 Jun 2005, Fred Gleason wrote: > > > On Tuesday 07 June 2005 16:04, Tristan Van Berkom wrote: > > > Since touchscreen drivers seem to be getting back in style, maybe > > > we should write up some live calibration support ;-) > > > > I'm game. I've actually been toying with the idea of doing something like > > this for the ELO drivers for some time. > > > > Before I go charging off and reinventing the wheel, does anything > simiklar to > > this exist already? Ideally, it should be sufficiently generic that any > > input device that uses absolute coordinates will be able to use it. > > > > Cheers! > > > > ___ > 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: Live Touchscreen Calibration [WAS: magictouch touch screen driver]
Hi, actually a great thing to have, but not that easy. The main problem is, that the driver itself has to be disabled. - this can be solved by quitting X and doing a calibration with touchcal - the other possibility is (I don't know how) to disable the driver while running X and then doing the calibration. and finally enable the driver again Maybe this is not possible. There is no function to disable a pointer device while running X. So you could add a feedback function to gain access to the driver and have a enable/disable routine. Veikko > -Original Message- > From: Fred Gleason [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 09, 2005 7:10 AM > To: devel@XFree86.Org > Subject: Live Touchscreen Calibration [WAS: magictouch touch screen > driver] > > > On Tuesday 07 June 2005 16:04, Tristan Van Berkom wrote: > > Since touchscreen drivers seem to be getting back in style, maybe > > we should write up some live calibration support ;-) > > I'm game. I've actually been toying with the idea of doing > something like > this for the ELO drivers for some time. > > Before I go charging off and reinventing the wheel, does > anything simiklar to > this exist already? Ideally, it should be sufficiently > generic that any > input device that uses absolute coordinates will be able to use it. > > Cheers! > > > |- > | > | Frederick F. Gleason, Jr. | Director of Broadcast Software > Development | > | | Salem Radio Labs > | > |- > | > | Easiest Color to Solve on a Rubik's Cube: > | > |Black. Simply remove all the little colored > stickers on the | > | cube, and each of side of the cube will now be the original > color of| > | the plastic underneath -- black. According to the > instructions, this | > | means the puzzle is solved. > | > |-- Steve Rubenstein > | > |- > | > ___ > 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: Live Touchscreen Calibration [WAS: magictouch touch screen driver]
It would be great if you could add that... what do you mean by "live calibration" ? It seems to me that calibration should be (mostly) a userland utility, that you do not want to run everytime the Xserver starts. I probably misunderstood what you meant. My only issue currently, is that if resolution changes, the mapping from touchscreen coords to screen coords changes, thus the touchscreen driver should be able to be notified, or query what the actual screen resolution is. The trick mentioned previsously about querying the current modeline would work, but it's a hack... something cleaner (portable, etc.) would be nicer. I admit I do not know the specifics of touchpad/stylus support, but I imagine that is also the only dynamic/live resolution support that would be necessary ? Something like XFGetCurrentMonitorResolution(displayID, &width, &height) ... BTW, I submitted the source for the magictouch driver on this mailling list, is there any chance it will appear in the XFree86 tree someday ? If a comitter needs changes, fixes to it or has questions, I'll be happy to help as I can. bruno On Thu, 9 Jun 2005, Fred Gleason wrote: > On Tuesday 07 June 2005 16:04, Tristan Van Berkom wrote: > > Since touchscreen drivers seem to be getting back in style, maybe > > we should write up some live calibration support ;-) > > I'm game. I've actually been toying with the idea of doing something like > this for the ELO drivers for some time. > > Before I go charging off and reinventing the wheel, does anything simiklar to > this exist already? Ideally, it should be sufficiently generic that any > input device that uses absolute coordinates will be able to use it. > > Cheers! > ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Live Touchscreen Calibration [WAS: magictouch touch screen driver]
On Tuesday 07 June 2005 16:04, Tristan Van Berkom wrote: > Since touchscreen drivers seem to be getting back in style, maybe > we should write up some live calibration support ;-) I'm game. I've actually been toying with the idea of doing something like this for the ELO drivers for some time. Before I go charging off and reinventing the wheel, does anything simiklar to this exist already? Ideally, it should be sufficiently generic that any input device that uses absolute coordinates will be able to use it. Cheers! |-| | Frederick F. Gleason, Jr. | Director of Broadcast Software Development | | | Salem Radio Labs| |-| | Easiest Color to Solve on a Rubik's Cube: | |Black. Simply remove all the little colored stickers on the | | cube, and each of side of the cube will now be the original color of| | the plastic underneath -- black. According to the instructions, this | | means the puzzle is solved. | |-- Steve Rubenstein | |-| ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: magictouch touch screen driver
bruno schwander wrote: [...] 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. [...] what would be useful is to find out the actual current screen resolution, not the virtual screen. Otherwise, the touchscreen behaves as if covering the whole virtual screen. I want just the visible screen. I don't think it would be useful to know what the viewing window is. I'll check on that modeline api, thanks. I am surprised this has not been solved in other drivers though. lol, Touchscreen and touchpad drivers are the only ones that (afaik) need to adjust to screen resolution, so I guess we're just straglers. Since touchscreen drivers seem to be getting back in style, maybe we should write up some live calibration support ;-) Cheers, -Tristan ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: magictouch touch screen driver
bruno schwander wrote: [...] 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. [...] what would be useful is to find out the actual current screen resolution, not the virtual screen. Otherwise, the touchscreen behaves as if covering the whole virtual screen. I want just the visible screen. I don't think it would be useful to know what the viewing window is. I'll check on that modeline api, thanks. I am surprised this has not been solved in other drivers though. lol, Touchscreen and touchpad drivers are the only ones that (afaik) need to adjust to screen resolution, so I guess we're just straglers. Since touchscreen drivers seem to be getting back in style, maybe we should write up some live calibration support ;-) Cheers, -Tristan ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: magictouch touch screen driver
On Thu, 26 May 2005, Andrew C Aitchison wrote: > On Wed, 25 May 2005, bruno schwander wrote: > > > 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. > > This is a long shot. > Clients like xdpyinfo use XF86VidModeGetModeLine() to get the > video timings, which include the current screen resolution. > > I'm used to using this to see whether the resolution has been > changed with and . > > That sort of resolution change leaves you with a virtual desktop, > so I don't know if it makes sense with a touch screen, but if so > XF86VidModeGetModeLine *doesn't* report the viewing window, > which makes the returned values less helpful. what would be useful is to find out the actual current screen resolution, not the virtual screen. Otherwise, the touchscreen behaves as if covering the whole virtual screen. I want just the visible screen. I don't think it would be useful to know what the viewing window is. I'll check on that modeline api, thanks. I am surprised this has not been solved in other drivers though. bruno ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: magictouch touch screen driver
On Wed, 25 May 2005, bruno schwander wrote: > 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. This is a long shot. Clients like xdpyinfo use XF86VidModeGetModeLine() to get the video timings, which include the current screen resolution. I'm used to using this to see whether the resolution has been changed with and . That sort of resolution change leaves you with a virtual desktop, so I don't know if it makes sense with a touch screen, but if so XF86VidModeGetModeLine *doesn't* report the viewing window, which makes the returned values less helpful. XF86VidModeGetModeLine is specific to XFree86 (and derivatives) and, more significantly, is a client call. You would have to trace the code back to find a way to get the equivalent information from within the server. -- Andrew C. Aitchison Cambridge [EMAIL PROTECTED] ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: magictouch touch screen driver
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 2>&1 echo x - magictouch/Imakefile sed 's/^X//' >magictouch/Imakefile << 'END-of-magictouch/Imakefile' X#define IHaveModules X#include 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 X#include X#define NEED_XF86_TYPES X#include X#include X#include X#include X#include X X#include "xf86MagicTouch.h" X XInputDriverRec MGT = { X1, X"magictouch", 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
Re: magictouch touch screen driver
[EMAIL PROTECTED] wrote: > > Hi everybody, > > I am interested in getting the magictouch driver running. According to the > cvs comments, it needs updating to the new 4.x interfaces. My questions > are then: > > - If there is no good sample driver, which driver would be a good starting > point ? i.e. up to date, not cluttered by extra device-specific stuff... I think the ELO one is simple enough. -SB ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: magictouch touch screen driver
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
Re: magictouch touch screen driver
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... then, how do I submit the driver ? send it to this list ? bruno On Sun, 22 May 2005 [EMAIL PROTECTED] wrote: > Hi everybody, > > I am interested in getting the magictouch driver running. According to the > cvs comments, it needs updating to the new 4.x interfaces. My questions > are then: > > - Is there a sample/dummy input driver available ? The one I could find is > marked as out of date. > > - If there is no good sample driver, which driver would be a good starting > point ? i.e. up to date, not cluttered by extra device-specific stuff... > I see dmc is still described in the driver man pages (thus probably > functional?) so I was going to use that as a model, unless someone more > familiar with XFree86 development sends me in another direction. > > Any advice, things to watch out for, are welcome... > > bruno > > > ___ > Devel mailing list > Devel@XFree86.Org > http://XFree86.Org/mailman/listinfo/devel > > ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
magictouch touch screen driver
Hi everybody, I am interested in getting the magictouch driver running. According to the cvs comments, it needs updating to the new 4.x interfaces. My questions are then: - Is there a sample/dummy input driver available ? The one I could find is marked as out of date. - If there is no good sample driver, which driver would be a good starting point ? i.e. up to date, not cluttered by extra device-specific stuff... I see dmc is still described in the driver man pages (thus probably functional?) so I was going to use that as a model, unless someone more familiar with XFree86 development sends me in another direction. Any advice, things to watch out for, are welcome... bruno ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel