Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TFT_print() problem after TFT_read_touch() call #52

Open
chrdan opened this issue Aug 28, 2018 · 4 comments
Open

TFT_print() problem after TFT_read_touch() call #52

chrdan opened this issue Aug 28, 2018 · 4 comments

Comments

@chrdan
Copy link

chrdan commented Aug 28, 2018

With TOUCH_TYPE_XPT2046 activated after calling TFT_read_touch() the TFT_print() command shows the first character of the given string crippled, which means the left and right part of that single character are swapped (for example an "O" changes from "()" to ")("), and its foreground color also isn't set correctly.

To get that result insert

  TFT_print("O_Untouched", CENTER, 80);
  vTaskDelay(10000 / portTICK_RATE_MS);

in tft_demo.c after line 996:

  if (TFT_read_touch(&tx, &ty, 0)) {
  ...
  }
  else {
    TFT_print("O_Untouched", CENTER, 80); // added
    vTaskDelay(10000 / portTICK_RATE_MS); // added
    doexit++;

Is there a display reinitialization problem after switching devices (disp_spi -> ts_spi -> disp_spi)?

Nice library, btw!

TIA

Chris

@viethoangitvn
Copy link

Hi Chris,
I am using ILI9341 and an NFC Reader that share the same SPI bus of ESP ( different CS pins) and can see same problem. Did you find the reason of this issue?

Thank you,
Viet Hoang.

@chrdan
Copy link
Author

chrdan commented Nov 14, 2018

Hi Viet,

before integrating this library into my AquariOS project (https://danner-net.de/ao.htm) in order to control an ILI9341/XPT2046 device, I had to fix minor bugs in _direct_send(), readPixel() and _drawLine() and rewrite touch_get_data() and TFT_read_touch_xpt2046().

What I still experience is a wrong background color of the first character that's drawn with TFT_print() after switching from ts_spi to disp_spi, which I wasn't able to sort out. That's why I have to do a dummy "TFT_print( " ", x, y);" between polling the touch device and intended TFT_print() calls, which as a side effect only causes a hardly noticeable flicker. Nevertheless it would be nice to get that fixed.

Kind regards

Chris

@sieren
Copy link

sieren commented Apr 18, 2019

@chrdan do you mind posting your touch rewrites somewhere? I'm running into the same issue apparently.

@mekkoli
Copy link

mekkoli commented Jul 19, 2021

same problem for me with XPT2046 and loboris great library.
anyone has solved this issue ?
@chrdan have you posted anywhere your solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants