Jump to content

wctltya

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by wctltya

  1. Hi Joel, Can't access keyset. Compiler error - " 'struct GWindowObject' has no member named 'keyset' " More () are needed. ((GKeyboardObject *)ghVirtualKeyboard)->keyset But it works with the following: ((GKeyboardObject *)ghVirtualKeyboard)->keyset = ((GKeyboardObject *)ghVirtualKeyboard)->keytable->ksets[N]; where of course 'N' is in the keyset table range, 0 to 4 for the VirtualKeyboard_English1
  2. Sorry for confusion. My question is: How I can change the currently displayed key set programmatically?
  3. I saw it (gwinKeyboardSetLayout()) , but its about the layout, isn't it, while I'm asking for the key sets. As I understood, reading the gwin_keyboard_layout.c & .h files, a particular layout (eg. VirtualKeyboard_English1) consists of several key sets (eg. Eng1Set0 to Eng1Set4 for VirtualKeyboard_English1). So I'm looking for a way to switch between them. For example that virtual keyboard appears with Eng1Set0 But what if I would like to appears/switch to Eng1Set1? I know that the user can scroll the key sets using the special key, even I didn't saw it in action because my touch screen is not fully operational yet(still working with a mock up), but how to control that from code?
  4. Hi, How I can change the actual key set of the virtual keyboard layout?
  5. Thank you very much for the quick replay inmarket. The GDISP_NEED_MULTITHREAD is defined TRUE. Actually I've used gfxSleepMillseconds accidentally, therefore I had a chance to see mouse poll during it. Because until now I didn't have the touch screen(delayed delivery), there is no events handling implemented so far. Although there is pe = geventEventWait(&glistener, 0), 'pe' is not used. Where I can see a RAW32 implementation/demo?
  6. Hi, I'm wondering what could be the reason that my touch screen is not polled? Actually, it is polled, but once at reset and then during gfxSleepMilliseconds() only. I'm sure, because I'm watching the low level interface with a logic analyzer. So, the driver is working properly and the data are delivered to the library trough GMOUSE_DRIVER_VMT get function. There is no OS, i.e. RAW32 is used. Because I don't see the big picture I don't know shall I init/manage somehow thread(s) and even shall I define GDISP_NEED_MULTITHREAD TRUE? Is there any additional info about how to implement properly RAW32?
  7. Hi inmarket, Sorry for late replay,but I wanted to test it carefully. It works, i.e. manually clearing both flags prevents wiping. Thank you for the advice.
  8. Hi Joel and inmarket, My application manages many pages which do not have dynamic contents only, but their layouts depends on the server's data as well. Even some of the pages doesn't fit the screen, therefore they are divided in many sub-pages. As I already mentioned in a few other posts there is no OS, the system has enough uC speed, flash and ram, but anyway the resource are not unlimited. The display is 320x480, display controller's integrated buffer and 16bit Parallel Port Interface is used. So an approach like: "1. Create all pages 2. Show First (let say Home) page 3. Show next page/Hide previous page (on demand or event)" is not suitable. Therefore I'm using this: "1. Create/Show Page_1 2. On Event - Destroy Page_1 3. Create/Show next (required) Page_2 etc..." Because the speed of PPI is limited to about 30MHz pages changing is visible. But I noticed that a full rendering with defaultBgColor happens at destroying the "old" page. That is logical, I though, if there is no other page, So I changed the sequence to: "2. On Event - Create Page_2 3. Destroy Page_1" But that makes the presentation even worst, because: At point 2 the desired Page_2 is rendered, then at point 3 - the screen is wiped (rendered with defaultBgColor), and then Page_2 is re-rendered again From my point of view the screen wiping is done for nothing and makes the presentation bad on displays with slow interfaces. I've done some debug and found that screen wiping is done at line 803 gwin_wm.c in WM_Redraw(GHandle gh) with: // Clear the area to the background color gdispGFillArea(gh->display, gh->x, gh->y, gh->width, gh->height, gwinGetDefaultBgColor()); at GWIN_FLG_BGREDRAW set. This flag is set internally in the same function and in two more _gwinRippleVisability() and gwinRedrawDisplay() at certain conditions. So, could you advice me, please - How to avoid the screen wiping?
  9. Sure, but in my particular case it is a dedicated HMI, so a communication with the main system is the only tasks run a side of the GUI. That is a very nice news. Can't wait to have it.
  10. I see inmarket. But the nowadays embedded systems normally are powerful enough. Especially in terms of calculating power/speed. For example my system is with cortex-m4 at 120MHz and integrated floating point. Might be better if there is an option to choose better presentation at the corresponding resources cost of course. So, are you not eager to make the ring a progress bar/slider?
  11. Joel, inmarket Thank you very much. The gdispDrawDualCircle() is exactly what I was looking for . In order to make it exactly FillRing(), I just removed the third line in the #define DRAW_DUALLINE(yval, r1, r2), i.e. "g->p.x = x-r2; g->p.x1 = x+r2; g->p.color = color2; hline_clip(g); \" and it was done. But what about the definition in gdisp.h void gdispGFillDualCircle(GDisplay *g, coord_t x, coord_t y, coord_t radius1, color_t color1, coord_t radius2, color_t color2); #define gdispFillDualCircle(x,y,r,c) gdispGFillDualCircle(GDISP,x,y,r1,c1,r2,c2) I think it shall be #define gdispFillDualCircle(x,y,r1,c1,r2,c2) gdispGFillDualCircle(GDISP,x,y,r1,c1,r2,c2) isn't it? And I noticed extra pixels on the poles(E, S, W, N) of the both circles. The inner has on East and West only, perhaps the North and South are covered by top and bottom part of the outer circle. So, I drew two circles over the ring using the midpoint algorithm. Attached is the function and both pictures. Sorry for the pictures bad quality, but the differences are clearly visible. Ring.zip
  12. Hi, I'm struggling to develop an algorithm to render a ring. Two concentric circles with a filled area between them. Already spent several days, but ... So, I'll appreciate if someone could help me. The easiest (obvious) approach drawing a number of circles doesn't work because there are many unfilled pixels, between them. That is obvious as well and is a consequence of the digitization. My function is based on the Midpoint Circle Algorithm https://en.wikipedia.org/wiki/Midpoint_circle_algorithm as uGFX draw/fill circle functions are based as well. The FillRing algorithm draws lines instead of dots only, trying to calculate the start and end points. For most of the lines is easy, but for some of them is not. The troubles appears when the circles (drawing) are in a different octets, excepts the top/bottom part (defined by r_out - r_in), which is the easiest part.
  13. Hi Joel, The gdispImageOpenFile() returns GDISP_IMAGE_ERR_UNSUPPORTED. I really don't know what is wrong with those 7 'bad' images, because they are displayed on the PC screen in many image view/processing software's without complains, and even in uGFX studio design view. Seems that the uGFX gif decoder couldn't process them. Anyway, I've used another way to convert images in proper (for uGFX) gif format and finally all of them are displayed now. Attached is one of the images in 'good' format. It's 'bad' version is the zip file attached before, so if you are curious you can have a look and try to find out the reason.
  14. Just to ensure that I understand this the right way: You are able to display all images - just not at the same time? No, I'm able to display 5 images at the same time if they are "good", i.e. one of both below. In fact I'm able to display 6 images on that page including the menu button. I'm curious Joel, if you run my Studio project on your computer - do you see all images or the preview screen? Yes, I'm sure I have enough memory. Right now the project is run on Kinetis MK64F1M0VLL12, which has 1MB flash and 256KB SRAM. But although I've enough resources, I can create a page when I need it and destroy it when I don't. That is not so easy, but finally I'll do it.
  15. Hi Joel, Increasing the GFILE_MAX_GFILES was the first I've done in my app. So now it is 100, although I need about 40. I'm using ROMFS and all images .h files are included in romfs_files.h Struggling whit that issue I've done some other tests: - Replaced one of the Imagebox with an image button and the result is the same - no image. - Generated image_file.h using file2c.exe and compared to the corresponding .h file generated by studio and they are equal. - Replaced all "wrong" images with one of those "good" images and they all are displayed.
  16. Hi, Attached is the uGFX Studio 0.15 project containing a single page with several small GIF images used as icons. The zip file includes 9 GIF images. I don't know what could be wrong with 7 of them, but only two are displayed ("service_output.gif" and "service_controlregulation.gif"). I won't worried if they are missing on the studio preview screen only, but they are not displayed on my application too. In that app I've implemented another background, so white squires are displayed instead of those 'wrong' images. A bit more info about images: The original files are in SVG format. So, I've converted them in GIF using GIMP and when I saw the most of them are not displayed, I've used another (an online) converter, but they behaves in the same way. All GIF images are displayed on the PC screen (windows) without complains. I'll appreciate if someone could help me to fix that. bifrost_service.zip
  17. Hi Joel, I've read your post here where you said: But I still don't understand how to provide 3 different images for button states "Released", "Pressed" and "Disabled"? How to "stack" 3 images? For me it is most important to have two different images for Enabled and Disabled sates. Anyway I've provided a single image and used gwinDisable() assuming, that it will stop rising the button's events. But was surprised that the image disappears as well. I know that I can change the image pointer and redraw it my self, but why to do it if it is already implemented in the library and can be achieved gwinDisable/Enable functions.
  18. Seems, I found a solution my self. Using the above page names: - The MenuPage container must be transparent, i.e. wi.customDraw = gwinContainerDraw_Transparent; - The previous page (HomePage) must not be hidden before displaying the MenuPage, i.e. don't invoke gwinHide(ghHomePage); - The button must used custom draw clean, the kings2's trick, i.e. wi.customDraw = gwinButtonDraw_Clean; - Mightbe needed to hide both pages before displaying a third one. It works.
  19. The goal is to have an area of the screen working as a button, but displaying whatever was there. I've the following scenario: A page, lets call it HomePage, which covers the whole screen. Then I've a second page, lets call it MenuPage, which covers a part of the screen. So, while MenuPage is displayed, I would like to have the remaining area still displaying the part of the previous HomePage and reacting as a button. For the button draw function, I'm using Kings2's trick: but, seems that gwinHide(ghHomePage) clears the screen. I've tried to not hide it, but it doesn't behaves as expected, the remaining area still cleared. Joel, inmarket, or someone else, could you please advice me how to do it?
  20. Hi Joel, I just locate the issue. It is caused by the font, although I don't know why. Because the issue exists on the preview screen too, I tried with the integrated fonts which are OK. See the attached screenshots, please. I'm attaching the ttf font and both converted files. I don't think it is relevant to the issue, but you'll see 3 ranges inside. I was wrong about this, due to my lack of knowledge/experience about the Studio. Once I've added the .ttf file and the engine name in the studio font manager, it became OK. RobotoTtfAndConverted12and16.zip
  21. Hi, I've the following label, which is in a container: // Create label widget: ghLabelUserFunctions wi.g.show = TRUE; wi.g.x = 82; wi.g.y = 12; wi.g.width = 218; wi.g.height = 20; wi.g.parent = ghContainerUserFunctions; wi.text = "ACTIVE FUNCTIONS"; wi.customDraw = gwinLabelDrawJustifiedLeft; wi.customParam = 0; wi.customStyle = 0; ghLabelUserFunctions = gwinLabelCreate(0, &wi); gwinLabelSetBorder(ghLabelUserFunctions, FALSE); //gwinSetFont(ghLabelUserFunctions, roboto_16); //gwinRedraw(ghLabelUserFunctions); If the last two lines are active the text is shifted about 12pxs right. The default font is roboto_12. On the uGFX Studio (project Screen) is OK, although in the preview screen is a mess. What could be the reason and how to fix it?
  22. Sorry guys, I found the answer. So, you can delete this topic.
  23. Perhaps such a question has been answered already, but I didn't found it. I would like to have different fonts for different widgets on a screen page. For example there many Labels which I would like to draw them in different fonts, sizes, colors. So, how to set the particular widgets font either in uGfx Studio and the code? In gui.c > guiCreate() is invoked gwinSetDefaultFont(FontName), but it is for the entire app (or page), isn't it? And how to set the text color, by the style structure foreground color? Or there is another way?
  24. Hi inmarket, I'm running it under Windows command prompt "D:\....\mcufont.exe ...", so I don't know how windows " source control fetcher " can fetch it in a different way than an executable, and same for dll's?!?
×
×
  • Create New...