Skip to main content
jimmii
Senior II
November 16, 2022
Solved

How to increase Maximum number of Timer widgets (MAX_TIMER_WIDGETS)?

  • November 16, 2022
  • 1 reply
  • 966 views

Hi

I have some wiedgets which are using the registerTimerWidget functionality.

My software crashes with an assertion:

*** assertion failed: timerWidgets.size() < MAX_TIMER_WIDGETS, file ../../../../framework/source/touchgfx/Application.cpp, line 585

The MAX_TIMER_WIDGETS are defined as 32 in the file Application.hpp. Now I wanted to increase that number, but the crash still happens at 32 registrations.

Now I assume that the library is precompiled with MAX_TIMER_WIDGETS = 32 and that your check does not check for the size of Vector<Drawable*, MAX_TIMER_WIDGETS> timerWidgets;

Anything I can do to increase that number? @Martin KJELDSEN​ 

Thanks for your help.

/jimmii

This topic has been closed for replies.
Best answer by Osman SOYKURT

Hello jimmii,

As you mentioned, the maximum number of timer widgets is 32. For the moment, it's not possible increase the value. So the workaround I can suggest is to use the handleTickEvent function to create you own timers.

We're thinking about increasing this value in the future but this is not one of our priority for the next releases.

/Osman

1 reply

Osman SOYKURT
Osman SOYKURTBest answer
ST Technical Moderator
November 18, 2022

Hello jimmii,

As you mentioned, the maximum number of timer widgets is 32. For the moment, it's not possible increase the value. So the workaround I can suggest is to use the handleTickEvent function to create you own timers.

We're thinking about increasing this value in the future but this is not one of our priority for the next releases.

/Osman

ST Software Developer | TouchGFX