cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446RE (64pins) with TouchGFX. I am using 3 fields wildcards to enter 1st name, l_name and dob. On another screen I display them back as summary. work most of the time but intermittently on the summary screen 1st name is not displayed back.

RBoud.1
Associate II
 
6 REPLIES 6
MM..1
Chief III

Show setup code for sumary screen

RBoud.1
Associate II

Thank you for the reply.

void Screen5View::setupScreen() // summary screen 

{

  Screen5ViewBase::setupScreen();

// step from summary 

// screen initialisation 

1- Unicode::strncpy(textArea_sum_first_NmeBuffer, textArea_sum_first_NmeBuf,sizeof(textArea_sum_first_NmeBuf));  

2-   textArea_sum_first_Nme.invalidate();

  

Unicode::strncpy(textArea_sum_last_NmeBuffer, textArea_sum_first_NmeBuf,sizeof(textArea_sum_last_NmeBuf));  

  textAreaSiteName.invalidate();

Unicode::strncpy(textArea_sum_DoBBuffer, textArea_sum_DoBBuf,sizeof(textArea_sum_DoBBuf));  

textArea_sum_DoB.invalidate();

  

Wildcards are setup the same as in the first screen.

I use data from HID keyboard to fill the buffer such as textArea_sum_first_NmeBuffer which has same length as the wildcards. I can switch between the 2 screen and I can see that the 1st name still displayed in the first screen. Also when debugging, I can see that the buffer textArea_sum_first_NmeBuf still retain that data. I couldn't see that data transferred to the wildcard buffer as the program freeze.

Unicode::strncpy(textArea_sum_first_NmeBuffer, textArea_sum_first_NmeBuf,sizeof(textArea_sum_first_NmeBuf));  
 
textArea_sum_first_Nme.invalidate();

try explain Buf and Buffer , where declared, where filled ...

Normal way is use model objects for this, and get it over presenter.

RBoud.1
Associate II

The array name terminated by Buffer such as textArea_sum_first_NmeBuffer is generated by the touchGFX and the one termated by Buf is created by me so to store the letter coming from the HID keyboard using interrupt. They are declared as follow:

 __IO char  textArea_sum_first_NmeBuf[20]={0}; 

__IO char textArea_sum_last_NmeBuf[15]={0}; 

__IO char textArea_sum_DoBBuf[10]={0};

in a file called USBHID.c then I use them in the summary screen file (screen5View.cpp) as follow

 extern char  textArea_sum_first_NmeBuf; 

extern char textArea_sum_last_NmeBuf; 

extern char textArea_sum_DoBBuf;

I believe these arrays are global and they can be seen by the screen5Veiw.cpp because of using the extern keyword.

I de-select Auto size for all wildcards.

I noticed also that function Unicode::strncpy doesn't work when I use for example  

extern __IO char  or extern static  textArea_sum_first_NmeBuf; 

Simply debug your code and check  textArea_sum_first_NmeBuf.

Seems somethink dont fill it ok.

RBoud.1
Associate II

Thank you, I will check it and get back to you.