Xinyuan-LilyGO / LilyGo-EPD47

GNU General Public License v3.0
379 stars 119 forks source link

Multi touch not working #53

Closed Windows98Pro closed 2 years ago

Windows98Pro commented 3 years ago

Hello, I have problem that multi-touch won't work.

I tried: 1: touch.scanPoint(): Returns 1 while touching (Multi-touch doesn't matter). 2:

for (int i = 0; i < 5; i++) {
  Serial.print(i);
  Serial.print(": ");
  Serial.print(touch.data[i].x);
  Serial.print(" ");
  Serial.print(touch.data[i].y);
  Serial.print(" ");
  Serial.print(touch.data[i].state);
  Serial.print(" ");
  Serial.print(touch.data[i].id);
  Serial.println();
}

Prints:

0: 469 246 6 2
1: 0 0 0 0
2: 0 0 0 0
3: 0 0 0 0
4: 0 0 0 0
0: 469 246 6 2
1: 0 0 0 0
2: 0 0 0 0
3: 0 0 0 0
4: 0 0 0 0
0: 469 246 6 2
1: 0 0 0 0
2: 0 0 0 0
3: 0 0 0 0
4: 0 0 0 0
0: 469 246 6 2
1: 0 0 0 0
2: 0 0 0 0
3: 0 0 0 0
4: 0 0 0 0
0: 469 246 6 2
1: 0 0 0 0
2: 0 0 0 0
3: 0 0 0 0
4: 0 0 0 0

Sometime touch.data[0].id will be 2 while multi-touching Aliexpress description says Support multi-touch, and I think this is not intended behavior.

martinberlin commented 2 years ago

I don't think this supports multi touch but still need to research more. The IC controller is called L58 and supposedly it comes from a mobile phone so it should work but I could never get so far more than one x, y coordinate pair on a single I2C read. Check my touch component: https://github.com/martinberlin/FT6X36-IDF

lbuque commented 2 years ago

thanks! see to https://github.com/Xinyuan-LilyGO/LilyGo-EPD47/commit/4b1bce07b567f2569395d2e7c24c566a0081b26e