Jump to content

Sting

Members
  • Posts

    77
  • Joined

  • Last visited

Everything posted by Sting

  1. I removed those lines and got the project to build. When I deployed it to the device a window is created but it is transparent. I will do some debugging but I suspect that there is something wrong with the library on that device. I did some easy fprintf statements to see if it was getting past gfxInit and it isn't. I will spend some time trying to see where it is hanging. Thanks for all of your help getting this going.
  2. I am having trouble getting the SDL2 board/driver to build so I thought I might just go to the framebuffer board. I used the example Makefile and added the appropriate parts and it seems to build, doesn't complain about anything. When I try to run it on the remote machine I get GDISP Framebuffer: Failed to set video mode. i trued with sudo and still no result. I can actually see the ioctl call where it fails, do I need to do something different?
  3. I set the following: CFLAGS += -I/usr/local/arm/sdl2/include/SDL2 -L/usr/local/arm/sdl2/lib -lSDL2 and make reports: ray@Newton:~/projects/BTest$ make . C Compiler Options.... /bin/sh: 1: sdl2-config: not found /bin/sh: 1: /usr/local/bin/sdl2-config: not found
  4. I want to use the new SDL2 board for my build/debug environment on a beaglebone black. I installed SDL2 on that machine and copied the arm shared object to my build machine. I took the Makefile from the Linux-SDL directory and after making the modifications, I attempted the first build. I get the error message: /bin/sh: 1: sdl2-config: not found /bin/sh: 1: /usr/local/bin/sdl2-config: not found sdl2-config is a shell script that tells where components have been installed. The problem is, I can't have where they are installed on the local machine determine where they are installed on the remote machine. Is there a way to ignore this shell script and I will tell the linker where the objects are in the lib path, or at least let me tell where the shell script is located.
  5. I am changing my ways, attempting to build projects in a shell using the makefile templates provided in the boards directory. I am using cross compiling to an armv7, an Arm Cortex-A8 processor on a beaglebone black. I built a new gmake_script for the board, any would have worked that have blank entries for SRCFLAGS and LDFLAGS. I took the makefile from the ugfx_2.6/boards/base/Linux-Framebuffer and copied to a directory where I wanted to build my project. I modified it as follows to use the X driver: # General settings # See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables OPT_OS = linux # Change this next setting (or add the explicit compiler flags) if you are not compiling for x86 linux OPT_CPU = armv7 # uGFX settings # See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables GFXLIB = /usr/local/arm/ugfx_2.6 GFXBOARD = Linux-Framebuffer GFXDEMO = modules/gdisp/basics # Linux settings # See $(GFXLIB)/tools/gmake_scripts/os_linux.mk for the list of variables ############################################################################################## # Set these for your project # ARCH = arm-linux-gnueabihf- SRCFLAGS = CFLAGS = CXXFLAGS = ASFLAGS = LDFLAGS = SRC = OBJS = DEFS = # list of libraries to include LIBS = X11 xcb Xau Xdmcp # strange place where I put the X includes INCPATH = /usr/local/arm/project/include # strange place where I put the X libs LIBPATH =/usr/local/arm/project/lib /usr/local/arm/arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf ############################################################################################## # These should be at the end # # Added as instructed in the X driver readme # Note the readme is wrong as it calls for gdisp_ll_X.mk instead of driver.mk include $(GFXLIB)/gfx.mk include $(GFXLIB)/drivers/multiple/X/driver.mk include $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk include $(GFXLIB)/tools/gmake_scripts/os_$(OPT_OS).mk include $(GFXLIB)/tools/gmake_scripts/compiler_gcc.mk # *** EOF *** I added a few thinks to the local .gfxconf.h #ifndef _GFXCONF_H #define _GFXCONF_H /* The operating system to use. One of these must be defined - preferably in your Makefile */ #define GFX_USE_OS_LINUX TRUE /* GFX sub-systems to turn on */ #define GFX_USE_GDISP TRUE #define GFX_USE_GINPUT TRUE #define GINPUT_USE_MOUSE TRUE #define GDISP_NEED_MULTITHREAD TRUE #define GDISP_SCREEN_WIDTH 640 #define GDISP_SCREEN_HEIGHT 480 /* Features for the GDISP sub-system. */ #define GDISP_NEED_VALIDATION TRUE #define GDISP_NEED_CLIP TRUE #endif /* _GFXCONF_H */ when I build it I get: Linking .build/ATest .build/obj/GFXLIB/drivers/multiple/X/gdisp_lld_X.o:(.rodata+0x0): multiple definition of `GDISPVMT_OnlyOne' .build/obj/GFXLIB/drivers/gdisp/framebuffer/gdisp_lld_framebuffer.o:(.rodata+0x0): first defined here .build/obj/GFXLIB/drivers/multiple/X/gdisp_lld_X.o: In function `gdisp_lld_init': gdisp_lld_X.c:(.text+0x208): multiple definition of `gdisp_lld_init' For everything including main from the demo directory. There has to be something I didn't do but I can't see it.
  6. I just got home and put together what I have working now. It run's on uGFX 2.5 and will spend some time today to see if I can get 2.6 working. If I forgot anything let me know. I do realize it doesn't qualify for the competition and will see if I can make that happen soon. I doubt it will be an issue with the widget, but will be an issue to weather I can get 2.6 working at all on my system. ugfxtable.tar.gz
  7. Sting

    Tree Widget

    You are correct, in the general sense this widget should function as a general tree, like the Windows File Explorer. I don't need nearly that level of generality so I will build a less general version and call it something specific to my application. I don't have the screen real estate as the list of nodes in the tree for my application will contain about 10 elements. What I need is a two level hierarchy with beer styles as the nodes and then recipes that I use for those styles as the children. I really only make about 10 styles so I figure I can combine the styles and the children in the same list.
  8. I am working on the design of a tree widget. If this is already being done, then I will stop this development. If not then I would consider feedback on the general idea. I only need a two level tree for my application, but if it is useful I will make it more general. The general idea is as follows. There will be two tree elements, a TreeNode and a TreeItem. The tree node will have a gfxQueueASync node_head; at the end of the structure just like the tree object so other elements can be added. Each element will be identifiable to determine if it is a node or an item. The position in the tree is described by a string "a.b.c.d" where each element is an index to that particular level of the tree. This limits the tree to 256 elements per level, If this is a problem it can be made into an array of uint16_t. Maybe making the position into an array of uint8_t is a better idea? The tree node will have a single char* identifier and a set of event spots that are selectable that will send events to the application. At the beginning of the node row will be an indicator that is selectable to determine if the node is expanded or collapsed, selecting will toggle the state. Two items can be added to the right of the node to send add node or add item events to the application, or anything the application wants to use them for, When a node is selected an event is sent to the application to allow the application to respond to the selection. I haven't looked close enough but I think this needs to be done in a similar way as the tabset is done so the application can set the UI to respond differently to the various node selections. The difference will be that the node selected will be determined by a position as described above. The tree item will be a row similar to the table widget. It can have an image and a set of columns. I can't decide if the column count is fixed over the tree for all items or if it is specific to a tree node. If it is specific to a tree node, each node has to carry the header information if the columns are to have headers. This is an optionable feature. When an item is selected an event is sent to the application to allow the application to respond to the selection. I haven't looked close enough but I think this needs to be done in a similar way as the tabset is done so the application can set the UI to respond differently to the various item selections. The difference will be that the item selected will be determined by a position as described above. There are probably many more things I haven't considered. Any feedback would be appreciated.
  9. I have played around with uGFX for about a month now and think I have a basis for how I want to build my brewery. The brewery, it is a home project and there will only be one of them, will be based on the STM32F746 Discovery board. It will consist of 3 network devices, the brew station, the ferment station, and the bar station. Each component isn't that sophisticated, and the GUI will be the prominent technical component and I have chosen uGFX library for that. I have a few questions: 1) I have not selected the RTOS for the project. I have a work project that will use FreeRTOS, and thought I could kill 2 birds with one stone if I used FreeRTOS. The issue is it is larger then other RTOS, like ChibiOS, but has a tcp stack built in. Has anyone used ChibiOS with a tcp stack with reasonable performance. The brewery applications will not be high performance applications, one second will be a very long time for this application. Any advice here would be appreciated. 2) What IDE do people use with the STM32F7 discovery board? I would prefer an open source IDE. I am currently using plain eclipse cross compiling to arm and using the remote project explorer to transfer the files to the arm board. Eclipse doesn't support the ST Link so I can move to another platform. Also if I do it correctly I can develop in uGFX without the hacks I have to use to work in raw eclipse. 3) Are there any text based database implementations that would allow an application to store information on the micro sd card? I don't need it to be fast.
  10. Here is a new image, I tried to create an mp4 from my phone to show it working but the file is about 15MB and figured it was too big. I am not finished yet, I wish I was, and I am going away for a week and a half returning the 12th. This won't leave me much time to finish, maybe I have to leave off some additional features I want to add . The state of the widget is: A title is not included though the implementation allows for it. This could be added with a switch GWIN_TABLE_USE_TITLE and would include 2 functions. gwinTableSetTitle(gh, char*); gwinTableSetTitleBackground(gh, color_t); // Available when the implementor sets GWIN_TABLE_NEED_TITLE // It should probably allow the title to be justified in left, center, or right // This isn't done yet. The header is drawn in Gray and a new api needs to be added to set the header background. gwinTableSetHeaderBackground(hd, color_t); //Available when the implementor sets GWIN_USE_TABLE_HEADER. This will be straight forward and maybe I will do it in the morning before I leave. This isn't the correct way to do it, as the list widget and the next widget, the Grid Widget have the same issue and a new style needs to be built to allow a consistent way to change the header, row background, and row even/odd background colors. I'll put it on the list. The current implementation doesn't provide a mechanism to replace the row text or column text. I am not that concerned about total row replacement but want to do column replacement. Maybe next release. The header cannot be replaced, the current implementation assumes it will be done once. This is straight forward but isn't done. Images of any size up to the font height can be used, larger ones will be used but will be truncated. The important part is that replacing the image only repaints the image, there is absolutely no flicker. Also, when a selection is made, only the past selection and the current selection are repainted. Ellipses are implemented but are not an option yet. There is a gfxAlloc/gfxFree used in the implementation and some code so I figured a user might want a faster smaller version so will add GWIN_TABLE_NEED_ELLIPSE sometime soon. This image uses 24 point font and includes ellipses. The label above the table is not part of the table but probably should be. It's size is not coordinated with the table size. This application uses the same images as for the U12 font. The application uses a timer to change the image in the front of each consecutive row every second. The video would show this. It would also show there is no flicker when the image is replaced.
  11. I want to enter my table widget into the competition. It is shown here with no scroll bars, but they are available when there are more items then the table can hold. The widget at the top is a label widget, it just happened to be in the image I took. It could be optionally added to the widget, it might be before the competition ends. I have a post in the User Projects forum if you want to know about the features at this point, but I do have over 2 weeks to make even better. It already is more feature rich then that post
  12. Sting

    Using c++

    I got it to work, however I don't think it is too pretty in the top of main I create the GHandle as GHandle ghThermo; // pass in address of the handle to the constructor GThermo* gThermo = new GThermo(&ghThermo, 230, 140); // The constructor GThermo::GThermo(GHandle* ghThermo, int x, int y) { ghandle = ghThermo; this->x = x; this->y = y; // Fixed width widget, any number will do this->width = 0; this->height = 0; wi.g.x = x; wi.g.y = y; wi.g.width = width; wi.g.height = height; *ghandle= gwinThermoCreate(0, &wi); gwinThermoSetBorder(*ghandle, TRUE); } This is not how it will be in implementation, it is just to see what needed to be done to get it to work. Anyone with a better idea I would certainly appreciate it.
  13. Sting

    Using c++

    Thanks, I looked at the oscilloscope demo. I can create widgets outside of the source tree. I link to them in main and everything works well. I am trying to figure out how to encapsulate a widget into a c++ class. At this point I think my problem is, I haven't looked at the underlying code enough I just want it to work :), and I am using a class variable for the GWidgetInit and the GHandle. All of the code works correctly except the widget won't draw. My next attempt will be to allocate these items in fixed memory and pass them into the class to be used. Is there a demo someplace that uses c++ with widgets?
  14. I changed to the font #define GDISP_INCLUDE_FONT_DEJAVUSANS12_AA TRUE in main I set this font as the default with gwinSetDefaultFont(gdispOpenFont("DejaVuSans12_AA")); and the string is written as => 120 ??C I will use snprintf, i just picked sprintf because it's automatic. Thanks for the reminder.
  15. Sting

    Using c++

    gwin_class.h is in the widget that is written in c. In the header of my c++ file if I include "gfx.h" and no other references ot anything gfx related. The class compiles. The include gwin_class.h is in the widget. If I include the header file for local widget in the header for the class I get the error in previous post. I moved the c++ files to be built first and the error is the same. I built a prototype that used the label widget in my class and it works perfectly with just the inclusion of gfx.h in the header of the class file. This is true when the class is first in the list of files to be built or last. All of the widget entry points are available. I have no experience using include with c files I will sort through how gfx.h works to see if I can figure out how to build to get my local widgets included.
  16. I write the value into an allocated buffer as follows: sprintf(gh2obj->celsius, "%d °C", t1); the relevant defines in my config file are #define GDISP_NEED_TEXT TRUE #define GDISP_NEED_TEXT_UTF8 TRUE #define GDISP_INCLUDE_FONT_UI2 TRUE I draw the string as gdispDrawString(gw->g.x + GTHERMO_CTEMP_XOFFSET, gw->g.y + GTHERMO_TEMP_YOFFSET, gw2obj->celsius, gw->g.font, Black); and the string shows with that character blank => 120 C
  17. I have two lines in my main program: int bar = gdispImageOpenFile(&colonImage, "Colon_10_64.gif"); int foo = gdispImageOpenFile(&oneImage, "One_40_64.gif"); fprintf(stderr, "Colon: %d, %d\n", foo, bar); if I execute them in this order the print result is: Colon: 0x8005, 0 If I swap the order of foo and bar the result is: Colon: 0, 0x8005 Is there a problem with opening more then one gif file?
  18. Sting

    Using c++

    I hope you don't misunderstand me here. I trust that µGFX works well with c++, just not for me. Something is wrong with my environment and with these questions and answers, maybe I can figure it out. There isn't a whole lot of information to give here. I create a c++ class and add #include "gfx.h" in the header for the class and the class will not compile. I get the message posted above. Today I added -std=c++11 for the c++ compiler and I can now add that include and it works. I can also add widgets that are built in the src tree. I tried the label widget and it works well. All I have to add is the gfx include and all of the symbols are available. Because my widgets are not built in the gfx tree then they are not available including gfx.h so i include the header for the widget, which is where the issue presents itself. to get the widget to compile I have to include gfx.h and gwin_class.h in the header for the widget. When I do this I get the same message as above.
  19. my prototype application for ugfx is an electric brewery, so, I need the degree symbol. I want to make a string like: "Temperature: \u00B0 C" Unicode escape characters in strings are only available in c99 standard so I add the -std=c99. When I build I get the error: /usr/local/arm/ugfx_2.5/src/gos/gos_linux.c:104:16: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function) clock_gettime(CLOCK_MONOTONIC, &ts); Is there another way to do this?
  20. Sting

    Using c++

    Your main page shows that I can use c++ to build my application. Since the previous version was in c++ I thought I'd see if I can figure it out. I have a widget in my local widgets directory and I can use it from main with no problem. I just include the header and it works well. I create a c++ class GThermo to attempt to encapsulate the widget in a class. From a base class with nothing really defined if I include the header for my widget I get the error: ../gcomp/GThermo.cpp:29:1: error: expected ‘}’ at end of input } without the included header it compiles as one would expect. Is there something unique to this environment that has to be done to make this work.
  21. Solved that problem, I forgot to add the #define BREW_NEED_THERMO right after I took the commented #if BREW_NEED_THERMO. In my private widgets I probably don't need this but it makes it more consistent with the widgets I will use. Argh, so much to learn.
  22. I understand development issues. The problem is, like many things with this project it doesn't seem to work correctly in my environment and I need to figure out how to make it work. Something is clearly wrong because the object file shows up in the linker output line and it still can't find the entries. arm-linux-gnueabihf-g++ -L/usr/local/arm/ugfx_2.5/lib -L/usr/local/arm/arm-linux-gnueabihf/libc/lib/arm-linux-gnueabihf -o "XUGfx" ./widget/gwin_clock.o Anyway, enough of that. What version of Eclipse do people use? I hate being the odd person out here and need to find a better way to use this awesome tool.
  23. I have some widgets I want to build that are custom for my application and not something anyone else would want to use. I created a directory in my project to put the widgets in and the files compile and the object files is added to the linker. I get messages that it can't find the functions defined in the object file. /home/ray/Eclipse/XUGfx/Debug/../main.c:117: undefined reference to `gwinGClockCreate' /home/ray/Eclipse/XUGfx/Debug/../main.c:118: undefined reference to `gwinClockSetBorder' I know it is getting somethings correst as it can't find gwinGClockCreate and main calls gwinClockCreate. Any help would be appreciated. If there is a better way to handle this situation I would be happy to hear.
  24. I just built my first Widget. There are things I still have to do like build use flags to reduce the functionality. The headers at the top are optional and when present are fixed in place like one would expect. If no row has an image the first column starts at the left edge of the box. The columns are divided evenly from the space left over from the images and the scrollbar. Text is truncated if it doesn't fit in the column space. The rows are optionally colored with an even and an odd background color. Rows can also have an optional background color that is present when the row is not selected. The background color has a higher priority then the odd/even color. The table is optimized for flicker by managing modifications, similar to the technique used in X windows, at least how it was when I worked on it many years ago. I still have some work on image background with the odd/even color, but I think that might be an implementer issue.
  25. Sting

    Widget Repository

    We tend to redraw the whole control. While slower it usually uses less code and doesnt have possible issues relating to redraw timing. The extra redrawing is usually not visible to the end user as you are overwriting without changing the bulk of the widget surface. @inmarket said: We tend to redraw the whole control. While slower it usually uses less code and doesnt have possible issues relating to redraw timing. The extra redrawing is usually not visible to the end user as you are overwriting without changing the bulk of the widget surface. In the case of the List widget and the Table widget The redraw visibly shows every line being redrawn in the simple case of a select. If it isn't a hard rule to not optimize redraw I would like to do it for the table widget. The reason it is visible is that each line is drawn with the background so the current text is cleared and then with the text is rewritten.
×
×
  • Create New...