eGUI 3.0 demo on TWR-LCD-RGB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

eGUI 3.0 demo on TWR-LCD-RGB

Jump to solution
6,414 Views
GeneGoff
Contributor III

I can run the eGUI 3.0 demo on the TWR-LCD-RGB just fine, but a couple of graphic objects don't show:

1) None of the Group Box Titles show but the group boxes and their content show fine.  I see the title text strings in the code but for some reason they don't get displayed.

2) The OK button in the Settings screen does not show it's title text "OK", the button just shows a blank button.  Again I can see the title text strings in the code but for some reason they don't get displayed.

Please explain why these text strings are not showing.  All other text strings for the various objects display fine.

Labels (1)
Tags (1)
1 Solution
4,927 Views
EarlOrlando
Senior Contributor II

Hi again Gene,

Please be sure that the SD card is inserted when the demo starts and be sure that the files "Arial8.d4l" and "CourierNew8.d4l" are located in the path "SDCARD:/Fonts/" (the files that you need in the SD card are located in "eGUI-master\_Official_Demos\EGUI_Demo\SD_Card_Content\Fonts" in the repository that you downloaded from Gargy007/eGUI · GitHub​).

Regards,

Earl.

View solution in original post

42 Replies
2,022 Views
elisamejia
Contributor III

Hi Luis,

Even if I declare the edit boxes INRAM, whenever I touch them the program crashes. I have a graph object and an edit box, and several buttons. If I touch the edit box, the graph stops updating and the buttons do not work anymore. This problem isn't solved even if I remove the touchenable flag from the edit boxes.

What else can I do?

Elisa

0 Kudos
Reply
2,022 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

How do you declare the edit box? Can you post the code?

Luis

0 Kudos
Reply
2,022 Views
elisamejia
Contributor III

This is how I declare the edit box:

D4D_DECLARE_REDIT_BOX_INRAM(tbxSP, TBXSP_POSX, TBXSP_POSY, TBX_SIZEX, TBX_SIZEY, 4, NULL, (D4D_OBJECT_F_VISIBLE | D4D_ALIGN_H_CENTER_MASK | D4D_ALIGN_V_CENTER_MASK | D4D_OBJECT_F_FOCUSRECT | D4D_OBJECT_F_TOUCHENABLE), &labelSPScheme, "0", FONT_ARIALBLACK20, 10, NULL, NULL, NULL)

0 Kudos
Reply
2,022 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

What is the code causing the crash?

Luis

0 Kudos
Reply
2,022 Views
elisamejia
Contributor III

I'm not sure which code is causing the crash. If I don't touch the edit box, everything works perfectly. However, if I touch it, the system stops working and I have to reset it. What I'm doing with the edit box is changing its text using the D4D_EditBoxPutChar function.

0 Kudos
Reply
2,022 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

When you use D4D_EditBoxPutChar, the array containing the text should be in RAM and have the right size. Have you checked that?

Luis

0 Kudos
Reply
2,022 Views
elisamejia
Contributor III

I have declared the text array as D4D_TCHAR, and as a global variable. According to what I've readen, this is the way to allocate the variable in the RAM memory using C. It is of size 3, because what I have to print there is a number between 0 and 999.

0 Kudos
Reply
2,022 Views
LuisCasado
NXP Employee
NXP Employee

An array of three characters uses 4 locations. The final NULL of the string is needed. Size has to be 4.

Luis

0 Kudos
Reply
2,022 Views
elisamejia
Contributor III

This is my function for changing the edit box text:

static void ChangeEditBox(D4D_OBJECT_PTR editBox, int value)

{

       D4D_EditBoxClearAll(editBox);

       int x, y, z;

       x = (value/100);

       D4D_SprintDecU8(x, &tmp_txt[0], 0);

       y = ((value - x*100)/10);

       D4D_SprintDecU8(y, &tmp_txt[1], 0);

       z = (value - x*100 - y*10);

       D4D_SprintDecU8(z, &tmp_txt[2], 0);

       tmp_txt[3] = NULL;

       if (x != 0)

       {

            D4D_EditBoxPutChar(editBox, tmp_txt[0]);

            D4D_EditBoxPutChar(editBox, tmp_txt[1]);

            D4D_EditBoxPutChar(editBox, tmp_txt[2]);

       }

       else

       {

            D4D_EditBoxPutChar(editBox, tmp_txt[1]);

            D4D_EditBoxPutChar(editBox, tmp_txt[2]);

       }

}

I call it every second from the screen's main function.

0 Kudos
Reply
2,022 Views
elisamejia
Contributor III

Hello Luis,

So, I have removed the function and kept the edit box text constant, but if I touch it the system crashes as well, so I'm guessing the problem is related to the Edit Box object instead of the way I'm changing its text. I really don't need it to be a Edit Box, it could be a label instead. However, I'm not sure how the D4D_SetText function works. Can you explain me how this one works? Maybe a label or a button won't crash the system.

Thanks,

Elisa

0 Kudos
Reply
2,022 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

You should report the issue in the eGUI Project : https://github.com/Gargy007/eGUI/

Luis

0 Kudos
Reply
2,022 Views
elisamejia
Contributor III

Thank you so much, it works now.

0 Kudos
Reply
2,023 Views
Jonathan_Iglesias
NXP TechSupport
NXP TechSupport

Hi Elisa,

1) As far as I know the D4D libraries are intended to be used on an RTOS in this case MQX

2)

pastedImage_1.png

this is the structure of the D4D files in the project .

3) you can have a file with all the Bitmaps,  for more information about how to show them check here.

there are the macros that are used to declare the pictures and show them and how you are supposed to  use them.

Regards.

Jonathan

2,023 Views
GeneGoff
Contributor III

Actually, the eGUI I'm using was obtained from github last week.  Thanks.

0 Kudos
Reply
2,023 Views
EarlOrlando
Senior Contributor II

Hi again Gene,

I downloaded the eGUI from  Gargy007/eGUI · GitHub​, I ran it in IAR 7.40.2.8570 with MQX 4.2 and the demo shows the group box titles and the text's buttons OK.

I took these demo's photos. If you have problems please attach some photos to see the demo's behavior.

pastedImage_1.jpg

pastedImage_4.jpg

pastedImage_5.jpg

pastedImage_6.jpg

pastedImage_7.jpg

Best regards,

Earl.

0 Kudos
Reply
2,023 Views
GeneGoff
Contributor III

Thanks Earl!

I just now downloaded eGUI 3.0 again from   Gargy007/eGUI · GitHub,  compiled it in IAR EWARM 7.4, and ran it on the TWR-K70 with the TWR-LCD-RGB and attached is a photo of the Settings screen.  As you can see, everything displays and works fine except none of the Groupbox titles show, and the OK does not show but the button still works.  Also, after loading the ALL_SYS....TXT file it shows blank in the left window pane regardless of ASCII or Unicode selection.  The TXT file appears to be loaded fine because it says it's size is 338B.

Thanks for your help,

Gene

eGUI screen shot.JPG

0 Kudos
Reply
4,928 Views
EarlOrlando
Senior Contributor II

Hi again Gene,

Please be sure that the SD card is inserted when the demo starts and be sure that the files "Arial8.d4l" and "CourierNew8.d4l" are located in the path "SDCARD:/Fonts/" (the files that you need in the SD card are located in "eGUI-master\_Official_Demos\EGUI_Demo\SD_Card_Content\Fonts" in the repository that you downloaded from Gargy007/eGUI · GitHub​).

Regards,

Earl.

2,023 Views
GeneGoff
Contributor III

That was it!  Thanks Earl!  Now I see the FONT_SYSTEM_SMALL was referencing a file using D4D_DECLARE_FONT_FILE rather than a font descriptor.  I don't know how the project knows to get the file from the SDCARD:/Fonts folder.

0 Kudos
Reply
2,023 Views
EarlOrlando
Senior Contributor II

In the archive "D4D_Configuration/d4d_user_cfg_app.h" is defined the macro D4D_FNT_WORK_PATH_DEFAULT (by default its value is "A:\\Fonts\\") which is the root path for the fonts.

Regards,

Earl.

2,023 Views
GeneGoff
Contributor III

Excellent, thanks!

0 Kudos
Reply
2,023 Views
EarlOrlando
Senior Contributor II

If a post answers your question, please click the Correct Answer button.

Thank you!

0 Kudos
Reply