I've have trouble getting anywhere near accurate stylus positions on a F-200 (and it is calibrated). For instance the left side X position starts at 200+ then goes to 30+ pixels
I'm using the standard SDL (and SDL_MOUSEMOVE and MOUSEBUTTONDOWN).
I've just added touchscreen support to my HW SDL libs, it's not brilliantly calibrated but I checked it against gph's and their mouse varies about the same. I'm wondering if the casing is pressing on the edges and offsetting it.
One thing I'd like to know is what the pointer calibration values mean (/etc/pointercal). gph's sdl seems to read it everytime an app starts (and it's written to by the calibration app) but do they make any sense?
Any chance you could put the compiled lib_SDL.a + header online? My linux install is seriously messed up and dont fancy spending rest of tonight installing the toolchain etc again.
EDIT: I think I got it to compile. How do I initiate the touchscreen in the code? I do not have a f200 so unable to try it myself and relying on others to test builds.
The touchscreen code automatically enables itself as a mouse as long as there is no USB mouse detected. It needs tweaking since it only sends mouse movements with the left mouse button down which isn't always desirable.
I'll upload the libSDL.a to my site later tonight when I switch back to linux.
Thanks for the info. If this works then you are a god My game already fully supports mouse so it should only need a recompile for touchscreen to work. I will keep an eye out for the update. Thanks again!
The precompiled libs are up on my site (here).
I'm trying to figure out how the pressure works - the driver returns a slightly varying value for it, but it only varies by about +/- 200 from 45200. The non-static value sort of suggests it can detect pressure difference, but since it's not generating values between 1 and 45000 makes what it does return useless.
EDIT:
I found out that the calibration file is from the linear module of tslib, HWSDL now reads and uses it - and the pointer is nigh on accurate!
I'd have had the calibration stuff in the first update if I'd only read the thread where Hangman mentioned tslib more carefully - I totally missed the tslib connection and spent several hours working it out myself... I'm hacking in the input smoothing too (I can't get tslib to load the modules properly) so that should help cut down the jittering pointer.
I'm just about to upload the pre-compiled version to my site too (forgot to do it when I submitted the svn.)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.