cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX Designer bug: adding Action or Object to Screen will reset all hardware button numbers to 0

Tuoman
Senior II

Hello,

I found this bug that caused a lot of problems until I found it out.

Adding action in Desginer will reset all button numbers to blank.

I wondered long time why buttons do not work anymore and why they keep resetting to blanks.

How to recreate:

  1. Create screen
  2. Create interaction(s) that has hardware button with number N mapped to some action
  3. Add (or remove) action to this screen
  4. Now all of the hardware button number N's have been resetted to nothing -> this will cause buttons to not work anymore until you painstakingly remap all of buttons. If you add(or remove) another action, you will need to remap all your buttons again and again everytime.

EDIT: Problem appears also with objects. So instead of step 3, add object (line, container, image etc.) and hardware button mappings will be reset to 0. 

5 REPLIES 5
Martin KJELDSEN
Chief III

Thanks for the report, Tuoman. Just to be clear, what's reset is if you've mapped the numbers to names through the .touchgfx file - The name disappears? If so, is it removed from the .touchgfx file?

/Martin

> if you've mapped the numbers to names through the .touchgfx file

I only use the TouchGFX designer, I have not modified the .touchgfx file manually.

Every "ButtonKey" parameter is changed to 0.

Here is my git diff when action has been added in Designer:

@@ -36,11 +36,11 @@
         "Interactions": [
           {
             "InteractionName": "Interaction1",
             "HasCompletedTrigger": false,
             "Trigger": {
-              "ButtonKey": 3,
+              "ButtonKey": 0,
               "Type": "TriggerPhysicalButtonClicked"
             },
             "Action": {
               "ScreenTransitionType": "ScreenTransitionNone",
               "ActionComponent": "Home2",
@@ -49,11 +49,11 @@
           },
           {
             "InteractionName": "Interaction2",
             "HasCompletedTrigger": false,
             "Trigger": {
-              "ButtonKey": 25,
+              "ButtonKey": 0,
               "Type": "TriggerPhysicalButtonClicked"
             },
             "Action": {

Thanks for fix, in advance =)

scottSD
Senior III

Something to try: "Generate Code" prior adding interactions.

 It might have something to do with how the generated/gui_generated files are created.

Not sure if this is related or not, but awhile back I saw strange behavior when copy/pasting shapes on the screen resulted in points being altered:

https://community.st.com/s/question/0D50X0000BXkOYeSQN/touchgfx-4123-shape-widget-duplication-doesnt-allow-different-points-than-the-original

>Something to try: "Generate Code" prior adding interactions.

This is impossible to solve problem, because problem is not when interactions are added. Nor the problem has to do with code, it has to do with TouchGFX generating .touchgfx configuration file.

Problem occurs if you click (+) button in actions -> immediately all hardware buttons are reset to 0. Generate code button does not save it.

But I noticed that again my hardware buttons were reset to 0, even though I didnt add actions. There might be more causes that reset hardware buttons than adding actions...

Tuoman
Senior II

>But I noticed that again my hardware buttons were reset to 0, even though I didnt add actions. There might be more causes that reset hardware buttons than adding actions...

I found more causes for this problem.

If you add any object to the view, it will reset all hardware buttons to 0 for that view! Very annoying! Adding image, line, button or custom container etc. will reset all hardware buttons to 0.