cancel
Showing results for 
Search instead for 
Did you mean: 

radioButton & toggleButton work in centre of screen; not at sides

Jarwu
Associate

Hello,

I use tft screen with touch panel. All buttons react on the touch correct beside radioButton and toggleButton. I used "small version" of toggleButton and medium of radioButton. Screen 240x320. When both of that buttons are on the centrer of the screen it correct reacts to touch. When that buttons are on the left or on the right of screen they not react on the touch. I am sure that touch screen library works correct. Reading of touching coordinates works very well and the measurement is accurate. It looks more like the error lies more with TouchGFX.

15 REPLIES 15

The reason I asked for a video is that I cannot see the problem occurring this way. If you filmed it and touched the screen I could see if it registers the coordinates properly. Especially at a higher frame rate.
One thing that could be happening is that the coordinates jump just before it registers a finger release. In that case the button press is cancelled. Cancelling happens when finger is on button, shifts outside button while touching and then is released.
If you can log the touch events in an array while debugging you might see this happening. Or output them via serial port.
In my application I use resistive touch and I ignore the first touch coordinates, because they are always off by a few pixels. Perhaps something similar happens in your application but at release of finger.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

Communication between TouchGFX structure and physical interface is by this function:

bool STM32TouchController::sampleTouch(int32_t& x, int32_t& y)

x and y are updated and functions return true only if touch happened what was calculated in touch panel driver library function. After release it returns false.

It's a pity that the internal structure of ToucGFX is so poorly documented because it is impossible to analyze what is in the method itself (STM32TouchController::sampleTouch) and how pressing and releasing the button is analyzed by your library. On the working buttons you can see that you have not fully developed it and I had to add software debonuncing. Otherwise the button could react many times when pressed and released. If you had documented everything better I would probably have solved the problem myself.

 

 

In my application I also use resistive touch and ignore the first touch coordinates, besides I perform several measurements in a cycle and calculate best values. I conducted test readings and they were stable and accurate. In addition, these button components behave correctly when they are in the middle, but not on the sides. In addition, on Button or FlexButton you can see exactly how and in which place it reads the place of pressing and reacts to releasing. So if you can see on this component that the data TouchGFX receives are correct, then according to my logic the fault must be sought inside it.


@Jarwu wrote:

 If you had documented everything better I would probably have solved the problem myself.


I don't work for ST. I'm just a user of TouchGFX. So I haven't written any of their documentation.

Can you share your project? I don't know the coordinates of the buttons.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
Jarwu
Associate

I didn't know you didn't represent ST. The ST representative also joined the discussion.

I solved the problem myself and it was on the side of the touch screen library, not touch gfx.

I appreciate your sincere willingness to help and I thank you very much for that. Best regards.


@Jarwu wrote:

I didn't know you didn't represent ST. The ST representative also joined the discussion.


All ST employees are identified by having "ST Employee" under their name:

AndrewNeil_0-1743416427259.png

 

Anyone that does not have "ST Employee" is not an ST employee.

https://community.st.com/t5/community-guidelines/st-community-welcome-guide/ta-p/575223#:~:text=Their%20online%20profiles%20feature%20the%20word%20%E2%80%9CST%20employee%E2%80%9D%20next%20to%20their%20names