Jump to content

Dvor_nik

Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by Dvor_nik

  1. 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?

     

  2.  

    @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:

     

    SW4STM32 - C_C++ - STM32F7-Disco_uGFX_drivers_ginput_touch_FT5336_gmouse_lld_FT5336_board_template.h - Eclipse 2017-09-11 17.55.25.png

    Makefile's version compiles OK with last HAL. 

  3. Thank you for solutions! I'll take a look on mcufont and try first variant.

    I'm not sure if I understand your question properly

    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" :)

  4. 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

  5. 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)
    },

  6. ../../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]

  7. 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.

  8. inmarket Thank you for fast reply! I will wait.

    Please, test this option too:

    #define GFILE_NEED_STDIO                             TRUE

    I got another compile error with it:

    Compiling gfile_scang.c
    Compiling gfile_stdio.c
    Compiling gfile_fatfs_wrapper.c
    ../../chibios/ext/ugfx/src/gfile/gfile_stdio.c: In function 'gstdioSeek':
    ../../chibios/ext/ugfx/src/gfile/gfile_stdio.c:29:14: error: dereferencing pointer to incomplete type
    ../../chibios/ext/ugfx/src/gfile/gfile_stdio.c: In function 'gstdioGetpos':
    ../../chibios/ext/ugfx/src/gfile/gfile_stdio.c:41:9: error: dereferencing pointer to incomplete type
    ../../chibios/ext/ugfx/src/gfile/gfile_stdio.c:41:19: error: 'GFILEFLG_OPEN' undeclared (first use in this function)
    ../../chibios/ext/ugfx/src/gfile/gfile_stdio.c:41:19: note: each undeclared identifier is reported only once for each function it appears in
    ../../chibios/ext/ugfx/src/gfile/gfile_stdio.c:43:10: error: dereferencing pointer to incomplete type
    make: *** [build/obj/gfile_stdio.o] Error 1
    make: *** Waiting for unfinished jobs....
    Compiling gfile_fatfs_diskio_chibios.c

  9. Hi! I need same help.

    When I try to set

    #define GFILE_ALLOW_FLOATS                           TRUE

    I have a building error:

    Compiling gfile.c
    Compiling gfile_fs_native.c
    Compiling gfile_fs_ram.c
    Compiling gfile_fs_rom.c
    Compiling gfile_fs_fatfs.c
    Compiling gfile_fs_petitfs.c
    Compiling gfile_fs_chibios.c
    Compiling gfile_fs_mem.c
    Compiling gfile_fs_strings.c
    Compiling gfile_printg.c
    Compiling gfile_scang.c
    Compiling gfile_stdio.c
    ../../chibios/ext/ugfx/src/gfile/gfile_printg.c: In function 'vfnprintg':
    Compiling gfile_fatfs_wrapper.c
    ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:62:9: error: 'f' redeclared as different kind of symbol
    ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:55:22: note: previous definition of 'f' was here
    ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:76:4: error: incompatible type for argument 1 of 'gfileWrite'
    In file included from ../../chibios/ext/ugfx/gfx.h:203:0,
    from ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:12:
    ../../chibios/ext/ugfx/src/gfile/gfile.h:167:10: note: expected 'struct GFILE *' but argument is of type 'float'
    ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:201:5: error: incompatible type for argument 1 of 'gfileWrite'
    In file included from ../../chibios/ext/ugfx/gfx.h:203:0,
    from ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:12:
    ../../chibios/ext/ugfx/src/gfile/gfile.h:167:10: note: expected 'struct GFILE *' but argument is of type 'float'
    ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:206:5: error: incompatible type for argument 1 of 'gfileWrite'
    In file included from ../../chibios/ext/ugfx/gfx.h:203:0,
    from ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:12:
    ../../chibios/ext/ugfx/src/gfile/gfile.h:167:10: note: expected 'struct GFILE *' but argument is of type 'float'
    ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:211:4: error: incompatible type for argument 1 of 'gfileWrite'
    In file included from ../../chibios/ext/ugfx/gfx.h:203:0,
    from ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:12:
    ../../chibios/ext/ugfx/src/gfile/gfile.h:167:10: note: expected 'struct GFILE *' but argument is of type 'float'
    ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:215:4: error: incompatible type for argument 1 of 'gfileWrite'
    In file included from ../../chibios/ext/ugfx/gfx.h:203:0,
    from ../../chibios/ext/ugfx/src/gfile/gfile_printg.c:12:
    ../../chibios/ext/ugfx/src/gfile/gfile.h:167:10: note: expected 'struct GFILE *' but argument is of type 'float'
    make: *** [build/obj/gfile_printg.o] Error 1
    make: *** Waiting for unfinished jobs....

    I try it on widgets demo. Just try to add this options.

    cttx5.png

    ///////////////////////////////////////////////////////////////////////////
    // GFILE //
    ///////////////////////////////////////////////////////////////////////////
    #define GFX_USE_GFILE TRUE
    #define GFILE_ALLOW_FLOATS TRUE // added
    #define GFILE_NEED_PRINTG TRUE
    #define GFILE_NEED_STRINGS TRUE

    #define GFILE_NEED_ROMFS TRUE

    Tools: ChibiOS2.6.6 and ChibiStudio Pre8

    What the best way to output float values through LABEL?

  10. Thank you for testing, Tectu! I will wait. Good luck with your exam.

    I'm going to try this board with uGFX 2.2 or 2.1 and report.

    Please stay tuned!

    Sure! :D

    UPDATE: uGFX release version (ugfx_release_22_150104.zip) works fine! Only repository version was broken.

  11. stmneko demo look ok too (except calibrations).

    It looks like fonts and filled circles are problematic.

    Yes... But https://www.dropbox.com/s/rajpbtvos6dknz9/Orientations.jpg?dl=0

    This is definitely strange. Can you please post your board file?

    It's standard board file from here: https://bitbucket.org/Tectu/ugfx/src/32ab371e4eda78636cfd356d4784f7c0bfde764a/boards/base/Embest-STM32-DMSTF4BB/?at=master

    I will also look tomorrow for which of the settings you can try turning off that might fix the problem.

    It will be good!

    Can anyone post hex file for this board with "widgets" or "button" demo, please? I would like to check it on my board. May be it's troubles with my toolchain (or hands :? )

  12. Hi! Thank you for fast replies. I could check it today.

    Try out another demo (best would be /demos/modules/gwin/widgets) and see how things go

    t5cal.png

    1m3sx.png

    Logo is ok! :shock:

    If that does not work, can you please send me your hex file(s) so I can look how it looks on my hardware

    It would be great if you could do this. :)https://www.dropbox.com/sh/as73myccme3ppma/AADlbA7A58_wPNSBKcHfzeIga?dl=0 There are two demos.

    If you are familiar with the STM32F4 FSMC interface and ChibiOS/RT you can try to lower your FSMC speed in the board file (between line 77 and 83 in the board file (/boards/base/Embest.../board_SSD2119.h).

    I tried different values, but glitches exactly the same. I added only freezes. I going to read more about it http://www.chibios.org/dokuwiki/doku.ph ... ternal_ram and will try more tomorrow.

    Can you please loop through the orientations using the touchscreen button multiple times and look if it behaves the same every time and also report which of the four orientations work and which does not.

    The same every times. Identical. Only the default orientation with bug. Look at the "comics": https://www.dropbox.com/s/rajpbtvos6dknz9/Orientations.jpg?dl=0

    If you don't mind, can you also please leave some information about the toolchain that you're using and whether you modified anything (makefile or anything else) in the provided demo.

    ChibiStudio pack. Preview8. GNU Tools ARM Embedded\4.7 2014q2\arm-none-eabi\

    Today I built all demos without modifications (I changed only output folder) special for tests :|

    Gdisp demo:

    "images":

    sp5d2.png

    "circles":

    miaw6.png

    "images_animated" - look ok and cool.

    "fonts"

    nxb5b.png

  13. Hi! I try to start with uGFX (it's looks great!) but I have a trouble with standart example on standart board :( :

    323rt.png

    (It's calibration)

    1. uGFX logo looks fine :shock:

    2. Calibration screen with glitches

    3. Program screen with glitches

    But glitches depends on the screen orientation. If I change orientation (by clicking on button from "button" demo), everthing looks ok (but if I return source orientation glithes return):

    wiqfy.png

    Hardware: Embest-STM32-DMSTF4BB (STM32F4Discovery, SSD2119 and touch STMPE811).

    Software: ChibiStudio, ChibiOS 2.6.6 and uGFX from repository.

    Could you tell me any suggestions, how i can fix it, please?

×
×
  • Create New...