Thread: iLiad Pressure sensitivity
View Single Post
Old 06-30-2008, 03:20 PM   #4
sanders
Connoisseur
sanders has learned how to read e-bookssanders has learned how to read e-bookssanders has learned how to read e-bookssanders has learned how to read e-bookssanders has learned how to read e-bookssanders has learned how to read e-bookssanders has learned how to read e-bookssanders has learned how to read e-books
 
Posts: 66
Karma: 918
Join Date: Dec 2007
Device: iRex Iliad
Quote:
Originally Posted by axel77 View Post
Shall we sponsor a WACOM pen for you?
Haha, thanks - I have two. I only have one iLiad though, and since I can't use the stylus calibration data in my program, I wanted to get a feeling for how much inter-machine difference there is in stylus calibration.

That, and I was hoping to get a moral boost when people run the test app and discover that their iLiad is perfectly able to scribble pressure-sensitive sketches on. I'm rather stuck at the partial updates problem right now, so the project is in hibernate mode.

Anyway, you can grab the executable from http://www.curly-brace.com/drawtest.

Before running it, you should find out what the pid of the Xfbdev server is, and send it a "kill -SIGSTOP". You can then run drawtest and scribble a bit with your pen. You will notice that I have to refresh the entire screen, which I throttle to once every few seconds. Exit for now is simply by typing ^C in the (ssh) terminal you ran it from, after which you can kill -SIGCONT the Xfbdev server again to get your system back (you may
need to flip a few pages in the content lister to force screen redraws). I hope you will notice some gray levels depending on the pressure you're scribbling with.

The story behind all this:

I don't like the quality of scribbles very much. Since they're not anti-aliased, they look much more "grainy" than the iLiad is capable of displaying. I wanted to experiment a bit with anti-aliased scribbles and perhaps one day write a full-blown graphics program for the iLiad, offering basic shapes and freehand drawing.

I quickly found out I can't use the normal X interface. The current software interface to the tablet doesn't provide pressure data. That means I need to read the raw packets from /dev/ttyS0. I therefore can't use the calibration data and will need my own calibration routine (current calibration is _very_ crude). Also, the X server can't be running at the same time as my app since we would be competing for input on /dev/ttyS0.
Hence the stop/restart action (which, obviously, would eventually be included in the application itself).

Another tough problem is partial updates. The official scribble app uses a special interface for this, in which they send custom commands to the driver. I asked on the iRexnet developer forum in an IM to Matthijs whether there is documentation for this, because obviously flashing the entire screen all the time is a definite showstopper. I haven't heard
back on this yet.

Last edited by sanders; 06-30-2008 at 03:23 PM.
sanders is offline   Reply With Quote