Hello
I'm new to Emwin product and Im working on a DASH to my Formula project:
picasaweb.google.com/100325893…21/Formula02?noredirect=1
Im usin EA LPC4088 Display unit, mbed base, rtos and emwin library.
I have made really simple display and got 1 per second frame rate.
Currently I have created memdev for hole display area 800x480.
Every time digits areas are first cleared, then written again and last updated to display.
Mostly I use this type of indicators:
void Warning_Indcator(unsigned int x_coord, unsigned int y_coord, unsigned char Warning_state, char *warning_text){
char aa2[40]={0};
GUI_RECT WarningRect = { x_coord, y_coord, 90+x_coord, 35+y_coord };
// Gear display
GUI_ClearRect(x_coord, y_coord, 90+x_coord, 35+y_coord); // Glear digit area...
GUI_SetColor(GUI_GRAY);
//GUI_DrawRoundedRect(x_coord, y_coord, 90+x_coord, 35+y_coord ,5);
GUI_DrawRoundedFrame(x_coord, y_coord, 90+x_coord, 35+y_coord ,3 ,3);
if(Warning_state){
GUI_SetColor(GUI_GREEN);
}
else {
GUI_SetColor(GUI_RED);
}
//GUI_DrawRoundedFrame(x_coord, y_coord, 90+x_coord, 35+y_coord ,7 ,8);
GUI_FillRoundedRect(x_coord+2, y_coord+2, 90+x_coord-2, 35+y_coord-2 ,2);
//GUI_FillRectEx(&WarningRect);
/*if(Warning_state){
}
else {
GUI_SetColor(GUI_WHITE);
}*/
GUI_SetTextMode(GUI_TEXTMODE_TRANS);
GUI_SetColor(GUI_BLACK);
GUI_SetFont(GUI_FONT_8X16);
GUI_DispStringAt(warning_text, 8+x_coord, 12+y_coord);
}
This is the way I have done it now, first it clears its own area draw its self then updated.
This is emwin thread
void EWMainTask(void const* args) {
static GUI_MEMDEV_Handle hMem;
EMWThreadId = Thread::gettid();
GUI_Init();
GUI_Delay(1); // kutsuttava ennen mitään piirtoja edes kerran.
hMem=GUI_MEMDEV_Create(0, 0, 800, 480);
GUI_MEMDEV_Select(hMem);
while (1) {
Draw_main_Window();
GUI_MEMDEV_CopyToLCD(hMem);
GUI_Exec();
Thread::wait(40);
}
}
Any help how get more frame rate than 1/sec would be well come.
LPC4088 is running its full speed.
Most likely program is run on external ram and flash.
I'm new to Emwin product and Im working on a DASH to my Formula project:
picasaweb.google.com/100325893…21/Formula02?noredirect=1
Im usin EA LPC4088 Display unit, mbed base, rtos and emwin library.
I have made really simple display and got 1 per second frame rate.
Currently I have created memdev for hole display area 800x480.
Every time digits areas are first cleared, then written again and last updated to display.
Mostly I use this type of indicators:
void Warning_Indcator(unsigned int x_coord, unsigned int y_coord, unsigned char Warning_state, char *warning_text){
char aa2[40]={0};
GUI_RECT WarningRect = { x_coord, y_coord, 90+x_coord, 35+y_coord };
// Gear display
GUI_ClearRect(x_coord, y_coord, 90+x_coord, 35+y_coord); // Glear digit area...
GUI_SetColor(GUI_GRAY);
//GUI_DrawRoundedRect(x_coord, y_coord, 90+x_coord, 35+y_coord ,5);
GUI_DrawRoundedFrame(x_coord, y_coord, 90+x_coord, 35+y_coord ,3 ,3);
if(Warning_state){
GUI_SetColor(GUI_GREEN);
}
else {
GUI_SetColor(GUI_RED);
}
//GUI_DrawRoundedFrame(x_coord, y_coord, 90+x_coord, 35+y_coord ,7 ,8);
GUI_FillRoundedRect(x_coord+2, y_coord+2, 90+x_coord-2, 35+y_coord-2 ,2);
//GUI_FillRectEx(&WarningRect);
/*if(Warning_state){
}
else {
GUI_SetColor(GUI_WHITE);
}*/
GUI_SetTextMode(GUI_TEXTMODE_TRANS);
GUI_SetColor(GUI_BLACK);
GUI_SetFont(GUI_FONT_8X16);
GUI_DispStringAt(warning_text, 8+x_coord, 12+y_coord);
}
This is the way I have done it now, first it clears its own area draw its self then updated.
This is emwin thread
void EWMainTask(void const* args) {
static GUI_MEMDEV_Handle hMem;
EMWThreadId = Thread::gettid();
GUI_Init();
GUI_Delay(1); // kutsuttava ennen mitään piirtoja edes kerran.
hMem=GUI_MEMDEV_Create(0, 0, 800, 480);
GUI_MEMDEV_Select(hMem);
while (1) {
Draw_main_Window();
GUI_MEMDEV_CopyToLCD(hMem);
GUI_Exec();
Thread::wait(40);
}
}
Any help how get more frame rate than 1/sec would be well come.
LPC4088 is running its full speed.
Most likely program is run on external ram and flash.
The post was edited 2 times, last by jsskangas ().