Dvor_nik
Members-
Posts
23 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Hi! It seems that there are some problems with the Custom Draw Routines assignment for the RadioButton. Look at the code and comments pls: // Custom Draw Routines for RadioButton: replace RadioButton with two (in one) image: void gwinRadioDraw_Image(GWidgetObject *gw, void *param) { coord_t sy; if ((gw->g.flags & GRADIO_FLG_PRESSED)) { sy = gw->g.height; } else { sy = 0; } gdispGImageDraw(gw->g.display, (gdispImage *)param, gw->g.x, gw->g.y, gw->g.width, gw->g.height, 0, sy); } // create button widget: ghButton4 - THIS ONE DISPLAYED IMAGES AND WORK GREATE wi.g.show = TRUE; wi.g.x = 0; wi.g.y = 204; wi.g.width = 68; wi.g.height = 68; wi.g.parent = ghContainerPage0; wi.text = "Button"; wi.customDraw = gwinButtonDraw_Image; wi.customParam = &MyImage; // image, everything OK with button! wi.customStyle = 0; ghButton4 = gwinButtonCreate(0, &wi); gwinSetFont(ghButton4, dejavu_sans_10); gwinRedraw(ghButton4); // create radio button widget: ghRadioButton1 - THIS ONE DISPLAYED STANDART RADIO AND WORK GREATE TOO wi.g.show = TRUE; wi.g.x = 80; wi.g.y = 60; wi.g.width = 68; wi.g.height = 68; wi.g.parent = ghContainerPage0; wi.text = "RadioButton1"; wi.customDraw = gwinRadioDraw_Radio; wi.customParam = 0; wi.customStyle = 0; ghRadioButton1 = gwinRadioCreate(0, &wi, MAIN_GROUP); gwinRadioPress(ghRadioButton1); gwinRedraw(ghRadioButton1); // create radio button widget: ghRadioButton2 - THIS ONE DOESN'T DISPLAYED and then the microcontroller freezes wi.g.show = TRUE; wi.g.x = 80; wi.g.y = 0; wi.g.width = 68; wi.g.height = 68; wi.g.parent = ghContainerPage0; wi.text = "RadioButton2"; wi.customDraw = gwinRadioDraw_Image; wi.customParam = &MyImage; // the same image! wi.customStyle = 0; ghRadioButton2 = gwinRadioCreate(0, &wi, MAIN_GROUP); gwinRedraw(ghRadioButton2); } I tried simple draw image without conditions or simple draw rect or text instead image, but I always got the same effect. uGFX from repository. Everything else works fine. Could your tell me pls, what's I doing wrong?
-
@cpu20 Small issue in gfxconf.h: #define GFX_CPU GFX_CPU_CORTEX_M7_FP // correct #define GFX_CPU GFX_CPU_CORTEX_M7_FPU // wrong
-
Thank you, @cpu20. I got a lot of useful information from you again. I was absolutely sure that hal_conf.h file in inc folder I successfully updated HAL now to last version 1.2.3 (there are many fixes in release note).
-
@cpu20 Could you tell me please, what did you exactly fix in includes? I tried update HAL for project's template from site (simple changed it in project to last version), but have compile error with touch and colors macros: Makefile's version compiles OK with last HAL.
-
-
Thank you for solutions! I'll take a look on mcufont and try first variant. I have both (cyrillic and latin) symbol in one label. It' work fine with full version of font, but font is too big. I can split it into two label and use two different font, but I wanted to do it the "right way"
-
Can I set two range? For example for Cyrillic and Latin symbols together. Something like: 32-126,300-333 Or merge two .c files into one file?
-
Thank you, Tectu!
-
Hi. I get building error when I set: #define GINPUT_NEED_TOGGLE TRUE TOOLS: CHIBIOS2.6.6 and ChibiStudioPre8 In file included from ../../chibios/ext/ugfx/src/ginput/ginput.h:44:0, from ../../chibios/ext/ugfx/gfx.h:210, from ../../chibios/ext/ugfx/src/gfx.c:16: ../../chibios/ext/ugfx/src/ginput/ginput_toggle.h:34:38: fatal error: ginput_lld_toggle_config.h: No such file or directory compilation terminated. make: *** [build/obj/gfx.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from ../../chibios/ext/ugfx/src/ginput/ginput.h:44:0, from ../../chibios/ext/ugfx/gfx.h:210, from ../../chibios/ext/ugfx/src/gos/gos_freertos.c:8: ../../chibios/ext/ugfx/src/ginput/ginput_toggle.h:34:38: fatal error: ginput_lld_toggle_config.h: No such file or directory compilation terminated. make: *** [build/obj/gos_freertos.o] Error 1 In file included from ../../chibios/ext/ugfx/src/ginput/ginput.h:44:0, from ../../chibios/ext/ugfx/gfx.h:210, from ../../chibios/ext/ugfx/src/gos/gos_chibios.c:8: ../../chibios/ext/ugfx/src/ginput/ginput_toggle.h:34:38: fatal error: ginput_lld_toggle_config.h: No such file or directory compilation terminated. Compiling gos_linux.c make: *** [build/obj/gos_chibios.o] Error 1 In file included from ../../chibios/ext/ugfx/src/ginput/ginput.h:44:0, from ../../chibios/ext/ugfx/gfx.h:210, from ../../chibios/ext/ugfx/src/gos/gos_win32.c:11: ../../chibios/ext/ugfx/src/ginput/ginput_toggle.h:34:38: fatal error: ginput_lld_toggle_config.h: No such file or directory compilation terminated. make: *** [build/obj/gos_win32.o] Error 1 In file included from ../../chibios/ext/ugfx/src/ginput/ginput.h:44:0, from ../../chibios/ext/ugfx/gfx.h:210, from ../../chibios/ext/ugfx/src/gos/gos_linux.c:11: ../../chibios/ext/ugfx/src/ginput/ginput_toggle.h:34:38: fatal error: ginput_lld_toggle_config.h: No such file or directory compilation terminated. make: *** [build/obj/gos_linux.o] Error 1
-
Hi! How I can add click event for LABEL widget? I think it not very hard (because it based on widget)? #if GINPUT_NEED_MOUSE { 0, // Process mose down events (NOT USED) 0, // Process mouse up events (NOT USED) 0, // Process mouse move events (NOT USED) },
-
[Bug Fix] STMPE811 Touch driver Self calibration
Dvor_nik replied to inmarket's topic in Development and Feedback
../../chibios/ext/ugfx/drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c: In function 'read_xyz': ../../chibios/ext/ugfx/drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c:212:4: warning: enumeration value 'GDISP_ROTATE_PORTRAIT' not handled in switch [-Wswitch] ../../chibios/ext/ugfx/drivers/ginput/touch/STMPE811/gmouse_lld_STMPE811.c:212:4: warning: enumeration value 'GDISP_ROTATE_LANDSCAPE' not handled in switch [-Wswitch] -
[Bug Fix] STMPE811 Touch driver Self calibration
Dvor_nik replied to inmarket's topic in Development and Feedback
inmarket Thanks for bug fixing! To Tectu (for future testing): 1. Add #define GMOUSE_STMPE811_SELF_CALIBRATE TRUE to gfxconf.h 2. Run some demo what contains button (the best is "button" demo for testing it in different orientation). 3. Touch the button. -
[Bug Fix] STMPE811 Touch driver Self calibration
Dvor_nik replied to inmarket's topic in Development and Feedback
Hi! Understand. Before this commit self calibration works fine on this board (yea, only in default orientation I forgot to report about it). #if GMOUSE_STMPE811_SELF_CALIBRATE #if GDISP_NEED_CONTROL switch(gdispGGetOrientation(m->display)) { case GDISP_ROTATE_0: case GDISP_ROTATE_180: pdr->x = gdispGGetWidth(m->display) - pdr->x / (4096/gdispGGetWidth(m->display)); pdr->y = pdr->y / (4096/gdispGGetHeight(m->display)); case GDISP_ROTATE_90: case GDISP_ROTATE_270: pdr->x = gdispGGetHeight(m->display) - pdr->x / (4096/gdispGGetHeight(m->display)); pdr->y = pdr->y / (4096/gdispGGetWidth(m->display)); } #else pdr->x = gdispGGetWidth(m->display) - pdr->x / (4096/gdispGGetWidth(m->display)); pdr->y = pdr->y / (4096/gdispGGetHeight(m->display)); #endif #endif Just lost break; operator I guest. -
Thank you very much, inmarket! I going to intensively test it now.
-
[Bug Fix] STMPE811 Touch driver Self calibration
Dvor_nik replied to inmarket's topic in Development and Feedback
Hi, inmarket. Self calibration doesn't work now! For GDISP_ROTATE_0. No reaction on touch. It was broken after "Fix to STMPE811 touch driver to fix self-calibration in other orientations" commit. Hardware: Embest-STM32-DMSTF4BB