cancel
Showing results for 
Search instead for 
Did you mean: 

Redrawing is not happening on the UI when expecting from a hardware button press.

AnanD55_kmwt
Associate II

Hi everyone,

I’m running into a strange rendering issue in TouchGFX and could use your insights.

What I’m Seeing

  • I have a function that hides or shows several UI elements (e.g. buttons) and then calls invalidate() on them.

  • When I invoke this function from a touch button, everything works as expected: the elements disappear from the screen.

  • However, when I call the exact same function from my hardware-button within (handleKeyEvent()), the elements become non-interactive (I can’t touch them) but they remain visible on screen.

What I’ve Confirmed

  1. The function is definitely being executed (the elements lose touchability) it means changes have applied.

  2. I’m correctly calling element.invalidate() (and even invalidating the parent container).

  3. If I defer the call using a flag and perform the update in handleTickEvent(), it works reliably. but I believe it is not a good approach.

What I’ve Tried

  • Calling the function via touchgfx::Callback<>

  • Triggering it with an “Action” in the Designer

Every approach applies the logical state change, but the visual update only appears when triggered by a UI button.

How can i solve this and what could be the possible issue here.

5 REPLIES 5
LouisB
ST Employee

Hello @AnanD55_kmwt,

Have you tried to do invalidations also before calling all the set-visible functions ?

BR,

Louis BOUDO
ST Software Engineer | TouchGFX

Yes, But It didn't work.

LouisB
ST Employee

You have this issue on target or on simulator ?
Have you tried to Debug your app in the simulator ? You can highlight the invalidated area and run the app tick by tick Simulator | TouchGFX Documentation.
Before hand set up the hardware button to a value that is mapped to your keyboard (Check the interaction tab in the designer).

BR,

Louis BOUDO
ST Software Engineer | TouchGFX

The issue is on target and since I have mapped the hardware button with the value which is not mapped with the keyboard I didnt test on the simulator.

 

LouisB
ST Employee

You can try to debug it on target so you can check the whole call stack when using a hardware button and touch, to see what differs.

Louis BOUDO
ST Software Engineer | TouchGFX