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.
解決済! 解決策の投稿を見る。
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.
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
Hi,
How do you declare the edit box? Can you post the code?
Luis
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)
Hi,
What is the code causing the crash?
Luis
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.
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
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.
An array of three characters uses 4 locations. The final NULL of the string is needed. Size has to be 4.
Luis
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.
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
Thank you so much, it works now.
Hi Elisa,
1) As far as I know the D4D libraries are intended to be used on an RTOS in this case MQX
2)
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
Actually, the eGUI I'm using was obtained from github last week. Thanks.
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.
Best regards,
Earl.
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
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.
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.
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.
Excellent, thanks!
If a post answers your question, please click the Correct Answer button.
Thank you!