[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: touchpad on powerbook5,6

> Too bad this cannot work with the absolute approach I use...
> I did however improve a bit the driver using a better smoothing function
> (inspired from your code)...

Did again some experiments:

1. Put Johannes/my userspace stuff into your driver skeleton and
switched from relative to absolute values.

2. Got the accumulator working. One remaining problem: dev->data
delivers incomplete packages too. But accumulation needs full datasets -
at least the first package, wich is everytime incomplete or crap. I
don't know exactly how to fix this and used dev->urb->transfer_buffer
and dev->urb->actual_length to figure this out and getting the data.

3. Instead of using the raw accumulator I use now an additional signal
shaped copy for calculations. In this copy all changes of the
accumulator are delayed a bit (think of an equalizer, wich holds the
peak for some time). This way we get a smoother overall signal without
having to hold previous values.

4. Calculation of positions is done in a different way then before. Used
a little bit statistics (mean calculation) and your istart/iend code
(wich was meant for finger detection). Short description:
* get the first and last sensor with signal above min threshold
* multiply pressure with position for each sensor between them and
cumulate the results
* divide the result by the sum of all pressure signals
* here we go with our calculated position
Side effect: People with big fingers are able to use this driver and
it's possible to use the flat finger instead of the finger tip. 

5. Send the maximum reported pressure instead of a static value to input
(ABS_PRESSURE). Then the driver is far less sensitive when used without

6. Changed YFACT to 43 (from native screen resolution 1280x854 I come to
64x43). If we use touchpad dimensions here it's 40 at least.

Perhaps you can reuse some of these things.

Disclaimer: Did no extensive testing so far. Works at least for a couple
of hours.

Reply to: