2022-12-05 02:45 AM
2022-12-05 04:42 AM
Show setup code for sumary screen
2022-12-05 06:26 AM
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.
2022-12-05 06:58 AM
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.
2022-12-05 07:25 AM
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;
2022-12-05 07:41 AM
Simply debug your code and check textArea_sum_first_NmeBuf.
Seems somethink dont fill it ok.
2022-12-05 08:53 AM
Thank you, I will check it and get back to you.