eGUI Slider Bug?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

eGUI Slider Bug?

3,192 次查看
rdazcal
Contributor III

Greetings all,

 

I'm working on the MCF52259 Tower kit with LCD, and using eGUI to develop a user interface.

 

So far it has behaved well. By the way... why don't you guys open a eGUI specific forum (as you have for USB, TCP/IP, etc)

 

Anyway... I think I found a bug with the "SLIDER" object.

 

When I try to change the text, I get an exception that halts my program. I already know why that is.

 

Basically, the Slider text is defined as read-only on creation, so it resides on ROM. When I call D4D_SldrSetText, it tries to write data to ROM thus the error.

 

Have you guys seen it?

Was that already solved on a newer eGUI release?

Am I missing something?

Should I try to solve this my self?

 

Thanks,

 

Rafael 

0 项奖励
回复
15 回复数

2,670 次查看
robroz
Contributor III

Hi,

after two years it seems that this bug still persists.

Is it possible that Label is still now working as it should do?

Thanks in advance,

regards,

Bulek.

0 项奖励
回复

2,670 次查看
anguel
Contributor V

IMHO eGUI is an amateur project which is not really supported. One might think that this is ok because it is free but on the other hand Freescale should finally decide to give its PEG (Pro) software for free because GUI is needed in modern projects and customers don't have time to waste. The PEG prices are simply unacceptable for low-volume projects. I also see that NXP, ST Micro and EnergyMicro are now including the professional Segger emWin for free use with their devices...

0 项奖励
回复

2,670 次查看
rdazcal
Contributor III

Well,

 

I think I managed to corerct this problem without changing the eGUI code,

 

instead of declaring the slider as in the example:

D4D_DECLARE_STD_SLIDER(scr1_slider1, “61%”,........

 

I created my own text buffer and passed it to the declaration:

char myText[8] = ""61%";

D4D_DECLARE_STD_SLIDER(scr1_slider1, myText,........

 

But now another problem appeared. When I change the text, it does not erase the old text. It only overlaps the new text over the old one.

 

Am I not using the slider object as intended? Should I use a label object to display a changing text instead of the slider test it self?

0 项奖励
回复

2,670 次查看
madifazio
Contributor III

Hi Rafael

 

This post help me to solve a similar problem.

and as Gargy sais, this is the standard way.

 

Thanks.

0 项奖励
回复

2,670 次查看
Victor125
Contributor I

 

Hi everyone.

 

I am trying to solve the problem of overwritten text in a label as you noted but I can't. I added D4D_OBJECT_F_TRANSP_TEXT to the D4D_LBL_F_DEFAULT define and I declare the label as a D4D_DECLARE_STD_LABEL_AUTOSIZE macro. The buffer text I use is declared as static char scrMain_scrTest_lblTime_str[] = " 0 ";

 

static char scrMain_scrTest_lblTime_str[] = " 0 ";
D4D_DECLARE_STD_LABEL_AUTOSIZE(scrTest_lblTime, scrMain_scrTest_lblTime_str, 170, 0, FONT_BERLIN_SANS_FBDEMI12)

 

Any help?

 

Regards,

Victor

0 项奖励
回复

2,670 次查看
Gargy
NXP Employee
NXP Employee

Hi, little misunderstanding - you heve to remove D4D_OBJECT_F_TRANSP_TEXT flags to redraw fore and also background colors.

 

Gargy

0 项奖励
回复

2,670 次查看
Victor125
Contributor I

 

I have removed all the references to D4D_OBJECT_F_TRANSP_TEXT and I have the same problem. There is a strange behavior because I have a simple screen with the next components:

 

D4D_DECLARE_STD_PICTURE(scrTest_test, 0, 0, &bmpPantallaTest)
static char scrMain_scrTest_lblTime_str[] = "00:00";
D4D_DECLARE_STD_LABEL_AUTOSIZE(scrTest_lblTime, scrMain_scrTest_lblTime_str, 170, 0, FONT_BERLIN_SANS_FBDEMI12)

static char scrMain_sldrBalance_str[] = "00:00";
D4D_DECLARE_RSLIDER_AUTOSIZE(scrTest_sldrBalance, scrMain_sldrBalance_str, SLDR_BAL_POSX, SLDR_BAL_POSY, SLDR_BAL_SIZEX, SLDR_BAL_SIZEY, 8, (D4D_SLDR_F_DEFAULT | D4D_SLDR_F_AUTOCOLOR | D4D_SLDR_F_BAR_SCALECOLOR), NULL, NULL, FONT_BERLIN_SANS_FBDEMI12, NULL, ScrMain_OnChangeSldr, NULL)

 

D4D_DECLARE_STD_SCREEN_BEGIN(screen_test, ScreenTest_)
  D4D_DECLARE_SCREEN_OBJECT(scrTest_lblTime) 
  D4D_DECLARE_SCREEN_OBJECT(scrTest_sldrBalance)
D4D_DECLARE_SCREEN_END()  

 

and the slider erase the buffer text before print the new buffer text but the label don't. Anyone knows why this difference?

 

Regards,

Victor

0 项奖励
回复

2,670 次查看
Victor125
Contributor I

 

Any solution to the previous post?

0 项奖励
回复

2,670 次查看
Gargy
NXP Employee
NXP Employee

Hi,

find and look on the macro definition of label default bahavior in our project - D4D_LBL_F_DEFAULT

 

Mainly in "d4d_usr_cfg.h" and "d4d_label.h"

 

And try to investigate (by preprocessor) what is the compiler use.

 

Gargy

0 项奖励
回复

2,670 次查看
Toe
Contributor IV

I ran into this issue too, and figure I'd share my solution.

 

Changing the D4D_OBJECT_F_TRANSP_TEXT option did not help.  I verified that the #define in d4d_usr_cfg.h is the one being used.

 

Changing D4D_LBL_FNT_PRTY_DEFAULT  to D4D_FNT_PRTY_TRANSPARENT_NO_MASK fixed the problem, but it doesn't look as nice.  I should be able to deal with that, though.

 

I'm using mqx 3.7 with egui 2.24.

0 项奖励
回复

2,670 次查看
Gargy
NXP Employee
NXP Employee

Hi,

 could you place here some picture of LCD that better describe the issue?

 

Petr

0 项奖励
回复

2,670 次查看
Toe
Contributor IV

Here are 2 shots that came out ok.  The name of the image shows the flag on or off.

 

http://dl.dropbox.com/u/9387542/D4D_FNT_PRTY_TRANSPARENT_YES_MASK.jpg

http://dl.dropbox.com/u/9387542/D4D_FNT_PRTY_TRANSPARENT_NO_MASK.jpg

 

The no mask uses the default background which I'm sure I can change, but may limit where I can put the text.

 

These labels are being updated every second to reflect attached sensor information.

 

7" 800x480 display.

0 项奖励
回复

2,670 次查看
Nouchi
Senior Contributor II

Hello,

 

I confirm this issue, a label modified by D4D_SetText (useful to display dynamics values), is well redrawn but also the background, when D4D_FNT_PRTY_TRANSPARENT_NO_MASK is selected.

The normal use should be with D4D_FNT_PRTY_TRANSPARENT_YES_MASK, but It seems missing a function to clear text area before redraw in this case.

 

0 项奖励
回复

2,670 次查看
rdazcal
Contributor III

Ok...

 

Label behaves exactly the same way...

 

I solved it by making disabeling transparency

 

Doesn't look as good but it's ok

0 项奖励
回复

2,670 次查看
Gargy
NXP Employee
NXP Employee

HI , this is standard way how to in eGUI make changeable texts.

 

It's not so comfort but because the eGUI is designed to safe as more as RAM then the first option of storing texts is flash. And in case that user knows that the text will be changed it must create the text array externally and put the pointer on this array into object.

 

Have a nice day

0 项奖励
回复