2020-09-21 02:42 AM
I implemented the sampleTouch function and so far it's possible to click a gui button. I tried touchgfx examples where you can press a button and it stays in pressed state. In my project every sampleTouch call gives a single touch event. Also drag is not working.
Would it be possible to create custom touch events?
2020-09-21 06:17 AM
Hello,
The DragEvent is based on the sampleTouch. If it does not work it means your sampleTouch() function is not working properly. This can be caused by a wrong initialization of the i2c interface for instance (if your screen communication protocol is I2C of course).
sampleTouch() is called every tick. TouchGFX retrieves this data and will create a drag event according to the data it receives.
On what board are you working ?
/Alexandre
2020-09-21 11:32 PM
Our screen has a seperate touch controller (mxt640u). Board is a stm32429-eval1. Communication via I2C is working. x/y data is passed to the parameters in the sampleTouch function and it's returning true if the panel is touched.
If I hold my finger on a button it gets constantly toggled. I expect it to stay in "pressed-mode" unitl release.
Thanks for your help
2020-09-23 01:40 AM
This issue with having your finger on a button and it gets constantly toggled is typically a TouchController issue or its interface at least. TouchGFX only works on what it receives. Are you sure, you receive every touch events ? Is your touchController able to update the coordinates at 60 Hz ?
/Alexandre
2020-09-28 11:49 PM
You are right, my sampleTouch function is not always returning true while the touch happens. I have to investigate this for now.
Thank you