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

Touchscreen Inconsistency #827

Open
Sflofler opened this issue Feb 18, 2025 · 3 comments
Open

Touchscreen Inconsistency #827

Sflofler opened this issue Feb 18, 2025 · 3 comments

Comments

@Sflofler
Copy link

Describe the bug:

I'm having some inconsistency with the touch screen. I'm currently building "my own" device, which is an ESP32-S3 with a TFT screen with XPT2046 touch controller, the rest of the modules are pretty much the ones mentioned in the docs.

I also have a CYD device on me and for the sake of curiosity I installed bruce on it just through the web flasher to see If I get the same behaviour, which I did!

Steps To Reproduce:

  • Device used:
    • Own ESP32-S3 with TFT display(ILI9341/XPT2046)
    • CYD 2432S028 (Dual USB)

So I found a way to easily reproduce it and by the looks of it it is always something that is looping somewhere in the code. The ones that I used to test it is the Brucegotchi and the Read Tag in the RFID menu. These menus are a struggle to get out of it, I have to press the screen multiple times or even hold it until it works, the problem in the RFID menu is that while pressing the screen a new option screen shows up but the input is not consumed so I accidentaly enter the Clone menu, It takes some tries until I can get access to what I want to in this menu.

I searched for references of EscPress, SelPress and other and I didn't found these variables beign used in these menus, I'm not entirely sure how input handling is implemented in these screens but let's take into consideration the Clock screen, It uses these variables and it works fine for me.

SPI is shared betwheen display and touch controller with separate CS pins.

These are my SPI settings(at the time of writing this):

#define SPI_FREQUENCY        10000000
#define SPI_READ_FREQUENCY   2500000
#define SPI_TOUCH_FREQUENCY  2000000

I did mess with it a lot so this is the current state but I also tried with the default values for CYD in the .ini files.

Expected behavior:

These menus shouls be responsive in only one touch.

Actual behavior:

Menus doesn't respond/ignore an certain amount of inputs, in this case in a resistive touch screen.

Additional context / logs:

It doesn't log anything actually but I did put a log when I touch the screen just to check if it is working and yes, It always logs the X and Y positions where it was touched.

@bmorcelli
Copy link
Collaborator

Brucegochi uses a LOT of resources, and inputs have delay in all devices, not only CYD...

@Sflofler
Copy link
Author

Even though the input log is fired normally? I guess this also applies for RFID menus, NRF24 Spectrum and other CPU hungry stuff?

@Sflofler
Copy link
Author

Defining USE_TFT_eSPI_TOUCH seems to fix the issue for my device.

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

2 participants