Replies: 29 comments 18 replies
-
@Bwanna Well, first off as I have pointed out before being retired I don't have the income to have a large number of MCU's and TFT's so I can't test this out. Looking at the code base it seems to me you should be able to simply edit your esp-tftespi-default-xpt2046.h config file on line 131 and change
removing 255 and replacing it with what ever pin number you have wired to the interrupt.
Will this speed touch up or even work? Sorry, I have no idea. Paul-- |
Beta Was this translation helpful? Give feedback.
-
Paul, As mentioned, I was able to get the PS library successfully working with an IRQ setting. The PS example sketch responds correctly and indicates proper action. I guess my question is more about trying to link the output of the XPT2046_PS IRQ action to the GUIslice touch response. This is where I'm unskilled in figuring it out. Some things I'm observing and wondering if this is where I can try to focus?
Or... am I seeing this completely wrong and there's another direction I should investigate. Thanks and all suggestions are very much welcomed! |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Again, I can't test this but I would start by set #define XPT2046_IRQ to your pin inside your esp-tftespi-default-xpt2046.h config then replacing the code inside GUIslice_drv_tft_espi.cpp between the #elif defined(DRV_TOUCH_XPT2046_PS)
Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna I assume you have his example TouchTestIRQ.ino running correctly, if not start there. For GUIslice, As I stated above first you need this constructor for XT2026_PS to be run where XPT2046_IRQ is set to the correct pin.
After which XT2026_PS's internal IRQ will set a flag to true for his routine tirqTouched(). once this routine returns true If his sample TouchTestIRQ.ino works and if GUIslice doesn't add GSLC_DEBUG_PRINT() statements to GUIslice_drv_tft_espi.cpp ; starting with the constructor and so forth. I'm afraid that's all the help I can give without hardware to test... Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna One thing I think you are still confused about is what the ISR does. It doesn't avoid polling! It simply makes it faster. What makes it all faster is the if you were to call getPoint() without testing this flag it would call XPT2046_Touchscreen::update() which does a lot of processing to only find out no one touched the screen. I hope that clears things up for you... |
Beta Was this translation helpful? Give feedback.
-
@Bwanna
(then what?) goal: GUISlice responds to touch event (i.e. Popup screen) I'm sorry but asking me the same questions a different way each time is getting irritating. Please re-read all of my comments before posting again... Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna I have in the past accepted donations of hardware and have debugged and fix the issues involved. But before you feel compelled to donate hardware I'll try one more time to explain why things can go much faster even though a popup doesn't occur instantly. Note its still quite possible that it won't go fast enough for you... The normal flow without ISR:
With ISR and my modified code inside GUIslice_drv_tft_espi.cpp testing isrWait you only call steps 4,5,6,7 if a touch was actually detected. This makes loop() go faster. Fast enough? I have no idea. You also haven't told me if you got the demo app TouchTestIRQ.ino working. If that doesn't work you have no hope of getting GUIslice working with ISR. Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna I would take the quick and dirty approach and edit XPT2046_Touchscreen::begin(SPIClass &wspi)
then run TouchTestIRQ.ino with your SPI.begin commented out to see it works. Then retry GUIslice... Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Post a zip file of your esp-tftespi-default-xpt2046.h config and your modified GUIslice_drv_tft_espi.cpp and GUIslice_drv_tft_espi.h files and I'll take a look. |
Beta Was this translation helpful? Give feedback.
-
Here they are: |
Beta Was this translation helpful? Give feedback.
-
@Bwanna I don't see anything out of order with these files. This only leaves you needing to add debug print statements to trace what is going on... Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna One other thing I just thought of. Post a zip of your TFT_eSPI User_Setup.h, User_Setup_Select.h, and GUIslice/src GUIslice_config.h If I can't find anything with these files I'm afraid I'm at the limit of help I can offer without hardware... Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna
User_Setup.h line 212
Paul-- |
Beta Was this translation helpful? Give feedback.
-
Hopefully, tracing will help you out...
However, If all else fails you can donate hardware. It a good deal for me. I add to my hardware collection and hopefully help you out. I can't promise success though.
Woops! Looks like I screwed up and gave my home address in the clear!!!
If it came through to you no problem but if no send an email not using github to my open email address [email protected]
and I'll send you my address...
…________________________________
From: Bwanna ***@***.***>
Sent: Thursday, August 10, 2023 1:17 PM
To: ImpulseAdventure/GUIslice ***@***.***>
Cc: Paul Conti ***@***.***>; Mention ***@***.***>
Subject: Re: [ImpulseAdventure/GUIslice] ESP32-XPT2046 Interrupt (Discussion #518)
The offer is still there is you want to try with the hardware...
—
Reply to this email directly, view it on GitHub<#518 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKQIQYWETDEGZGGBLWMLTHLXUUJRLANCNFSM6AAAAAA3EYS2QM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Paul,
I just appreciate the help in figuring this out or at least determining
what's the issue. How you enjoy. It's a cool setup.
Amazon says you should get to you tomorrow.
Cheers,
Steve
…On Fri, Aug 11, 2023, 2:18 PM Paul Conti ***@***.***> wrote:
Hopefully, tracing will help you out...
However, If all else fails you can donate hardware. It a good deal for me.
I add to my hardware collection and hopefully help you out. I can't promise
success though.
Anyway, My address is:
Paul Conti
21 Maurice Street
Haverhill, MA 01832-2540
USA
________________________________
From: Bwanna ***@***.***>
Sent: Thursday, August 10, 2023 1:17 PM
To: ImpulseAdventure/GUIslice ***@***.***>
Cc: Paul Conti ***@***.***>; Mention ***@***.***>
Subject: Re: [ImpulseAdventure/GUIslice] ESP32-XPT2046 Interrupt
(Discussion #518)
The offer is still there is you want to try with the hardware...
—
Reply to this email directly, view it on GitHub<
#518 (reply in thread)>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/AKQIQYWETDEGZGGBLWMLTHLXUUJRLANCNFSM6AAAAAA3EYS2QM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub
<#518 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGA5YH3S3FPR2GRDDTEYFUTXUZZOZANCNFSM6AAAAAA3EYS2QM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
@Bwanna I have received the board and it runs the demo preloaded. I also can see the port (com5) on my windows 11. But no docs so I'm unclear of setting up with Arduino IDE. What esp32 board (chip) have you selected and what memory configs? Is there a wiki for this version? A link to the amazon page you ordered from? Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Never mind, I think I found the wiki page. I'll let you my progress. It may take a few days... |
Beta Was this translation helpful? Give feedback.
-
@Bwanna I can't seem to get upload to work from the Arduino IDE. Serial Monitor works printing out debug statements from the program that came pre-loaded using 9600 baud but I can seem to replace it. Pressing boot and then reset just restarts the pre-loaded app. and upload fails. Am I missing a trick here? |
Beta Was this translation helpful? Give feedback.
-
@Bwanna |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Once again. never mind... |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Ok, first bit of progress, how to get XT2046_PS to use HSPI interface without coding changes to XPT2046_Touchscreen library.
This works great. Tomorrow I'll modify GUIslice config to add
and go from there... Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna I modified GUIslice to have the option to use HSPI. To turn that option on you simply add the #define I mentioned above. Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Ok, I have identified the problem. The touch is in fact working but we only get one event when using IRQ (which makes sense) but GUIslice is coded to detect a stream of touch events because that the way non-IRQ happens, Thus, without IRQ we detect:
With IRQ, the first touch causes GSLC_TOUCH_DOWN and all other touches from that point on only GSLC_TOUCH_MOVE occurs, so a button is high-lighted (selected) but nothing fires for a callback because it's waiting for GSLC_TOUCH_UP_IN. One quick and dirty fix would be to change the callback to check events for whatever we are getting back. Not sure what that is yet... Paul--- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Maybe, I'm not really sure... My recent try was checking for the #define XPT2046_IRQ inside GUIslice.c but the touch code is spread out over quite a few places so my attempt failed. Basically, with my mods to GUIslice.c running the ex02_bld_btn_txt (the one with a single QUIT text button) I got the callback no matter where on screen I touch, even out side the button area. So that didn't work. I sent email to Calvin for advice but I'm not sure of a response so I'll continue to dig through the code. This is most likely going to take a few days. Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Ok, I made some progress here. I think the basic flow is working but could use your help in testing. My version reports as Now a rather big outstanding issue even if your testing goes smoothly is that you no longer have glow working. Your thoughts on that would be useful... You can download my repository here: Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Ah, One more thing. I created a new config file you should use. No editing required on your part. Paul-- |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Well, before I continue trying to debug any chance you could test the performance of touch. The whole point is whether or not its fast enough for what you are trying to do. If not, i can stop here otherwise I'll look into fixing calc. |
Beta Was this translation helpful? Give feedback.
-
@Pconti31 Some additional information. I initially ran your GUISLICE_VER "0.17.1.3A on Arduino IDE, which compiled without issue. Since I'm in the process of learning Platformio, I created a new project using this same version and received a problem report in file "GUIslice_drv_tft_espi.cpp" for "too many arguments in function call" referring to line 1654 "hspi" being highlighted It also gave problem message for the same thing: "no matching function for call to 'XPT2046_Touchscreen::begin(SPIClass&)'" It's interesting that the Arduino IDE didn't show this. |
Beta Was this translation helpful? Give feedback.
-
@Bwanna Well, if its the same performance than there is no point in going further with this. There is no polling taking place other than testing for the interrupt which is a simple test of a Boolean., Sorry, but I think this is lost cause so I'm giving up at this point. I think you are better off seeing if you can shave off performance some other way. |
Beta Was this translation helpful? Give feedback.
-
I have a similar question as tfischer4765 in posting: https://github.com/ImpulseAdventure/GUIslice/discussions/505
Started a separate posting to not hijack that one.
I've been successful using the ESP23 and PaulStoffregen XPT2046_Touchscreen driver. Both the TouchTest and TouchTestIRQ sketches work successfully.
Also, Ive been successful with GUISLICE using the ESP32, TFT_eSPI, and XPT2046_PS driver. HOWEVER, the Touch response is painfully slow as it waits for polling.
I'd like to have the XPT2046_PS IRQ initiate a GUISlice response upon a touch event without waiting for polling. Is this possible using the XPT2046_PS library?
r/
Steve
Beta Was this translation helpful? Give feedback.
All reactions