Skip to main content
Associate III
April 18, 2024
Solved

Weird causes with my touchgfx project

  • April 18, 2024
  • 3 replies
  • 6215 views

Hi everybody!

I implemented a keyboard into my project. (I tested the keyboard widget in a separated project, and it worked well).

If I use the keyboard in my dashboard project, it make weird things.
If i entry a value, i write to the eeprom(M95320). If is restart the dashboard, i read all eeprom value.

On the "Beállítások 1" screen work perfect the keyboard and value entry. 
But on the "Beállítások 2" doesn't it work good. The end of the video you can see this.
Keyboard text area wrong and when(2:29) i entry a value to "Levegő tartály szorzó", then change the values some textarea to zero and "Emap nyomás szorzó" will be 5.0.

I don't know where to look for the error, but it's very strange that it doesn't always do it.
Here is the video:
Youtube video 

Thanks!

This topic has been closed for replies.
Best answer by MM..1

Place breakpoints into all that go to zero. Seems your touch set multiple true ...

And maybe use if keyboard isvisible return... as first line

3 replies

GaetanGodart
Technical Moderator
April 18, 2024

Hello @Thomas8607 ,

 

From the video it seems to work fine for 90% of the duration.
Only at the end it is poorly behaving.

First your screen goes black and then you have the animation that we already talked about together playing.
I guess this is due to a reset of the board.
Then the values are loaded and displayed correctly.
Then you change one of the values and all the others go to 0.

Could it be that your memory is reset after the initialization?

Can you try debugging it using an IDE or by printing the values?

 

Regards;

Associate III
April 18, 2024

Hello, 

 

I pushed the reset button, where is dark screen

GaetanGodart
Technical Moderator
April 18, 2024

Yes ok.

When you get a new value entered (from the keyboard) do you update all of the values of every field?

Visitor II
April 19, 2024

@Thomas8607 wrote:

Hi everybody!

I implemented a keyboard into my project. (I tested the keyboard widget in a separated project, and it worked well).

If I use the keyboard in my dashboard project, it make weird things.
If i entry a value, i write to the eeprom(M95320). If is restart the dashboard, i read all eeprom value.

On the "Beállítások 1" screen work perfect the keyboard and value entry. 
But on the "Beállítások 2" doesn't it work good. The end of the video you can see this.
Keyboard text area wrong and when(2:29) i entry a value to "Levegő tartály szorzó", then change the values some textarea to zero and "Emap nyomás szorzó" will be 5.0.

I don't know where to look for the error, but it's very strange that it doesn't always do it.
Here is the video:
Youtube video 

Thanks!


If you find any solution also tell me i am also facing similar type of issue.

Associate III
April 19, 2024

Can you show me your issue on a short video?

Already I have only one error, with keyboard only on two screens.

Keyboard Textarea ??? 

and on the other screen the letters

GaetanGodart
Technical Moderator
April 19, 2024

Hello @Thomas8607 ,

 

Great that you solve your issue.

 

Regarding the unexpected characters, I found the issue.
When changing screen, the allocated memory space for the buffer was not empty so we have to reset it at initialization.
To do so I added a resetBuffer(); at the end of the initialization function (void containerNumKeyboard::initialize() ).
Also, I had to modify the reset function that was optimized to only reset the position that were not empty, but this time they are all non empty so I changed the line
for(int i = 1; i<=positionText; ++i) buffer[i] = '\0';
by
for(unsigned int i = 1; i<=sizeof(buffer); ++i) buffer[i] = '\0';

That solved the issue.

 

Also, I have found un unexpected behavior of your "0" key.
When trying to update the area 3, if pressing 0, I cannot press another key after, so I cannot, for instance, enter the number 806 or 1002 or 2024.

 

Regards,

Associate III
April 19, 2024

I checked, so there is no waste in the buffer memory.

I checked what you write with zero errors. I reviewed the terms and conditions and rewrote them.

I'll test tomorrow to see if everything is off.

 

Thanks for the help!

I'm sorry that only one answer can be accepted, yours was also helpful.

Best regards, 

Tamas