Dvor_nik Posted February 20, 2015 Report Share Posted February 20, 2015 Hi! I need same help.When I try to set#define GFILE_ALLOW_FLOATS TRUEI have a building error:Compiling gfile.cCompiling gfile_fs_native.cCompiling gfile_fs_ram.cCompiling gfile_fs_rom.cCompiling gfile_fs_fatfs.cCompiling gfile_fs_petitfs.cCompiling gfile_fs_chibios.cCompiling gfile_fs_mem.cCompiling gfile_fs_strings.cCompiling gfile_printg.cCompiling gfile_scang.cCompiling 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 1make: *** Waiting for unfinished jobs....I try it on widgets demo. Just try to add this options.///////////////////////////////////////////////////////////////////////////// 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 TRUETools: ChibiOS2.6.6 and ChibiStudio Pre8What the best way to output float values through LABEL? Link to comment Share on other sites More sharing options...
inmarket Posted February 20, 2015 Report Share Posted February 20, 2015 Thanks for finding the bug. Code gets changed and we don't always get to test every code option.I will fix it in the master repository in the morning (too late for me now).Using sprintg is probably the best way to get a float value into a label. Given that you have found this problem it looks like you were heading that direction anyway. Link to comment Share on other sites More sharing options...
Dvor_nik Posted February 20, 2015 Author Report Share Posted February 20, 2015 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.cCompiling gfile_stdio.cCompiling 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 typemake: *** [build/obj/gfile_stdio.o] Error 1make: *** Waiting for unfinished jobs....Compiling gfile_fatfs_diskio_chibios.c Link to comment Share on other sites More sharing options...
inmarket Posted February 20, 2015 Report Share Posted February 20, 2015 Both these compile bugs should now be fixed. Link to comment Share on other sites More sharing options...
Dvor_nik Posted February 24, 2015 Author Report Share Posted February 24, 2015 Thank you very much, inmarket! I going to intensively test it now. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now