From: Richard Purdie <rpurdie@rpsys.net>
To: Harald Welte <laforge@gnumonks.org>
Cc: openezx-devel@lists.gnumonks.org, linux-kernel@vger.kernel.org,
"Michael 'Mickey' Lauer" <mickey@tm.informatik.uni-frankfurt.de>
Subject: Re: How should Touchscreen Input Drives behave (OpenEZX pcap_ts)
Date: Thu, 18 May 2006 10:52:27 +0100 [thread overview]
Message-ID: <1147945947.20943.22.camel@localhost.localdomain> (raw)
In-Reply-To: <20060518070700.GT17897@sunbeam.de.gnumonks.org>
Hi,
On Thu, 2006-05-18 at 09:07 +0200, Harald Welte wrote:
> 0) What kind of X/Y/Pressure values should I return? Are they supposed
> to be scaled to the X/Y resolution of the LCD? As of now, I return
> X_ABS, Y_ABS and PRESSURE values between 0 and 1000 (each).
>
> However, the coordinates are actually inverted, so '0,0' corresponds
> to the lower right corner of the screen, whereas '1000,1000' is the
> upper left corner. Shall I invert them (i.e. return 1000-coord')?
Just send the raw data to userspace. Any translations needed can be
handled in userspace by the calibration program. You probably want to
have a look at tslib: http://cvs.arm.linux.org.uk/cgi/viewcvs.cgi/tslib/
The range of the values also doesn't really matter and scaling would
again get handled in userspace.
> 1) where does touchscreen calibration happen? The EZX phones (like many
> other devices, I believe) only contain resistive touchscreens that
> appear pretty uncalibrated. I'm sure the factory-set calibration
> data must be stored somewhere in flash, but it's definitely handled
> in the proprietary EZX userland, since their old kernel driver
> doesn't have any calibration related bits.
Calibration happens in userspace and tslib stores the result
in /etc/pointercal. If you device has this data stored in hardware, you
could have a userspace app translate that data into such a file,
otherwise, you can run a calibration program such as ts_calibrate (from
tslib) or something like xtscal.
> 2) what about the 'button' event. In addition to the pressure (which is
> about 300 for regular stylus use, > 400 if you press hard and > 600 if
> you use yourfinger), some existing TS drivers return a button press.
> Is it up to me to decide after which pressure level to consider the
> button to be pressed / released?
If the user is pressing the screen at all, its a button event and
release is when they stop touching the screen. I'd try not to make it
depend upon pressure but it will depend on the hardware to a degree.
Admittedly, tslib doesn't do much with pressure information at the
moment but tslib would the the correct place to handle pressure rather
than have every kernel touchscreen driver doing it.
For debugging, I'd highly recommend the test tools in tslib (ts_print,
ts_calibrate and ts_test). Use them in that order, checking for sane
output with ts_print first, get a working calibration second and finally
prove its working with ts_test. I found them to be very useful when
developing corgi_ts.
I'm told you're thinking about using OpenEmbedded and would highly
recommend it. It should easily be able to provide a known working
userspace with tslib and these tools in.
Regards,
Richard
next prev parent reply other threads:[~2006-05-18 9:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-18 7:07 How should Touchscreen Input Drives behave (OpenEZX pcap_ts) Harald Welte
2006-05-18 9:52 ` Richard Purdie [this message]
2006-05-18 10:58 ` Harald Welte
2006-05-18 12:44 ` Michael 'Mickey' Lauer
2006-05-18 11:16 ` Florent Thiery
2006-05-18 14:38 ` Harald Welte
2006-05-18 15:35 ` Florent Thiery
2006-05-18 16:19 ` Andy Ross
2006-05-18 16:27 ` Harald Welte
2006-05-18 23:16 ` Pavel Machek
2006-05-18 23:27 ` Harald Welte
2006-05-21 18:35 ` Pavel Machek
2006-05-18 16:17 ` Andy Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1147945947.20943.22.camel@localhost.localdomain \
--to=rpurdie@rpsys.net \
--cc=laforge@gnumonks.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mickey@tm.informatik.uni-frankfurt.de \
--cc=openezx-devel@lists.gnumonks.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox