Rockbox

Tasklist

FS#10615 - Cowon D2 Touchscreen driver

Attached to Project: Rockbox
Opened by Carsten Schreiter (Kuma76) - Friday, 25 September 2009, 03:35 GMT
Last edited by Rob Purchase (shotofadds) - Saturday, 26 September 2009, 17:34 GMT
Task Type Patches
Category Drivers
Status Closed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch (my first one) makes the Cowon D2s touchpad usable. No unintended double touches anymore and only really, really, really rare wrong detections.

While reading the coordinates the touchpad is put into the idle mode, which somehow reduces wrong readings drastically but they still occur. To get rid of them each touch is red five times, the coordinates are sorted and the 3rd value is taken.
Additionally this patch adds a dead zone between buttons when the touchsreen is in button mode.

Try it out and let me know what you think!
This task depends upon

Closed by  Rob Purchase (shotofadds)
Saturday, 26 September 2009, 17:34 GMT
Reason for closing:  Accepted
Additional comments about closing:  In r22842 & r22843.
Comment by Brian DIll (bkd11) - Saturday, 26 September 2009, 04:05 GMT
Nice work! The accuracy of the 3 x3 grid seems much better with this patch.
Comment by Rob Purchase (shotofadds) - Saturday, 26 September 2009, 15:11 GMT
Many thanks for this. The accuracy is much improved, the "dead zone" around the 3x3 buttons is a real help, and because you put the touchscreen in 'idle' mode this also reduces CPU usage while the screen is pressed. Good stuff all round!

I will commit this with a couple of changes:

- the 'dead zone' is too large (3% works just as well and results in fewer frustrating "dead" presses)
- the comparator function can be replaced with a simple *(short*)a - *(short*)b
- use the TIME_AFTER macro instead of directly comparing ticks

Thanks!

Loading...