cancel
Showing results for 
Search instead for 
Did you mean: 

handleTickEvent in ScreenView not called - why?

KR51K
Associate III

Hi,

I'm new with TouchGFX and working on my first project. My current problem is that I wnat to update display values from my software. I looked into several tutorials and found that when implementing the function

virtual void handleTickEvent();

in the ScreenView.hpp/ScreenView.cpp this function should be called with every update of the display. But this function is never called. The Constructor is called and also the (empty) setupScreen, but not the handler. I'm using a basic example at the moment so its running without an OS, just in the main loop.

Coudl you give me any hints why this function is not called? Do I have to register it somewhere?

Thanks and best regards!!!

2 REPLIES 2
KR51K
Associate III

Sorry, didn't write that I also call "OSWrappers::signalVSync();" before "MX_TouchGFX_Process()"

Osman SOYKURT
ST Employee

Hello KR51K,

The handleTickEvent() needs to be declared in the hpp like this:

virtual void handleTickEvent();

and it's used like this in the cpp :

void Screen1View::handleTickEvent()
{
// your code
}

Does your application work on the simulator?

Also, I don't think calling OSWrappers::signalVSync() before MX_TouchGFX_Process() is an issue.

I'm attaching a very basic example of this function usage, can you try it?

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX