New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
RyeBrye
Old
#1  
Member - OP
Thanks Meter 0
Posts: 46
Join Date: Oct 2008
Post Source code for the G1 multitouch proof-of-concept posted

Anyone interested in exploring how the device tracks the two fingers can grab the source and play with it.

http://www.ryebrye.com/blog/2008/11/...e-code-posted/
 
Koush
Old
#2  
Recognized Developer
Thanks Meter 880
Posts: 917
Join Date: Sep 2007
Quote:
Originally Posted by RyeBrye View Post
Anyone interested in exploring how the device tracks the two fingers can grab the source and play with it.

http://www.ryebrye.com/blog/2008/11/...e-code-posted/
It looks like the stuff you uncommented is just debug code, and the driver is still in fact reporting 2 finger tracking:

Code:
if (z) {
	input_report_abs(ts->input_dev, ABS_X, pos[0][0]);
	input_report_abs(ts->input_dev, ABS_Y, pos[0][1]);
}
input_report_abs(ts->input_dev, ABS_PRESSURE, z);
input_report_abs(ts->input_dev, ABS_TOOL_WIDTH, w);
input_report_key(ts->input_dev, BTN_TOUCH, finger);
finger2_pressed = finger > 1 && finger != 7;
input_report_key(ts->input_dev, BTN_2, finger2_pressed);
if (finger2_pressed) {
	input_report_abs(ts->input_dev, ABS_HAT0X, pos[1][0]);
	input_report_abs(ts->input_dev, ABS_HAT0Y, pos[1][1]);
}
pos[1][0] and pos[1][1] is the position of finger 2, and pos[0][0] and pos[0][1] is the position of finger 1.

They are populated in the loop:
Code:
int p = buf[base + 1];
...
pos[f][a] = p;
My guess is that the C++ framework code and Java code need to be tweaked to handle multitouch (with no changes to the driver at all). I'm not too familiar with the code. Have you figured out how the input_report_abs gets handled?
 
www.rzr.online.fr
Old
#3  
www.rzr.online.fr's Avatar
Member
Thanks Meter 2
Posts: 46
Join Date: Nov 2005
Location: fr/35/rennes
Default apple's software pattents

I am afraid this is becoming *ALSO* a legal issue now :

http://www.newlc.com/en/multitouch-f...#comment-50240
http://rzr.online.fr/q/handset#
Devices: nokia n950 | nokia n810 | openmoko freerunner | greenphone | nokia 770 | nokia e7
http://rzr.online.fr/java.htm
 
LPChris
Old
#4  
Senior Member
Thanks Meter 0
Posts: 201
Join Date: Jul 2007
Way to dig up a 3 month old thread and post a completely irrelevant news article in it.
 
vihil
Old
#5  
Member
Thanks Meter 1
Posts: 33
Join Date: Nov 2008
Quote:
Originally Posted by LPChris View Post
Way to dig up a 3 month old thread and post a completely irrelevant news article in it.
relax. next time, just move on to the next thread it won't hurt anybody.

and it is relevant, sorta.
Tags
apple patents