Jump to content

Joel Bodenmann

Administrators
  • Posts

    2,620
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Joel Bodenmann

  1. Hey mate, I'm sorry. There was a huge spam attack going on over night and I had to delete several accounts, most of which were inactive like yours. I observed that you where online many times but you never actually wrote something, so I thought you might have been some sort of scan bot. Please don't take this personally. You're totally welcomed here. ~ Tectu
  2. Can you please describe what exactly you did? There happened some real life stuff and I won't be able to put together a full tutorial before wednesday. ~ Tectu
  3. Maybe it would be a nice idea if we'd introduce some value widget. It would be like a label widget, but you can only display digits. You give it the amount of digits before and after the decimal point and then you can simply display integer values. It can then recognize the changes very easily and just update the changed ones. Let me know about your results. ~ Tectu
  4. Redrawing any GWIN widget does indeed clear the entire widget are with the background color and redraw from ground up. The label does the same. To optimize this, you'd need to know the current content of your display memory and with most setups you don't do that (no double buffering). You'd first have to read back that pixel and then decide if it would need to be updated or not. Just redrawing every pixel is way more efficient there. However, usually you don't redraw yourself anyway. The widget recognizes itself when its content changed. As soon as you call gwinSetText() on your label, it will update while the others stay the way they are. ~ Tectu
  5. Making a widget unvisible using gwinSetVisible() will clear the entire widget area with the currently set background color. That's the reason why you get a differently colored rectangle there. Furthermore, a widget does have a clipped area using gdispSetClip(). However, destroying a widget should reset the clipper - I'll take a look into this. To draw anything on the screen, you should just create a plain GWIN window and draw to it using all the gwinDrawXxx(GHandle, ....) API calls (Take a look at /demos/modules/gwin/basic). This will workaround your clipping problem too. ~ Tectu
  6. I just found time to add a very small step-by-step guide to the font documentation. I hope that this helps for the meantime. Please let me know about any upcoming problems. ~ Tectu
  7. You will have to use the toggle driver of the ginput module. You can find several examples on how to use it within the /demos directory (search for *Toggle*). Currently there's just the input driver for the ChibiOS/RT PAL HAL (I assume that is what you're using). Therefore there shouldn't be a lot of trouble to get it working. You can take a look at the example file for the olimex board to see how it's done. I'll add this to my ToDo list to write proper documentation about it. ~ Tectu
  8. Why do you want to do that? The way it's meant to be done is that the button sends an event when it gets touched. In case of you want this to set some "pressed animation", that is also a job that's handled by the button widget. ~ Tectu
  9. Which toolchain are you using? The recommended toolchain for ChibiOS/RT is the GNU ARM GCC. You may also want to run uGFX natively on you host computer to simplify the development process and finding bugs. ~ Tectu
  10. The GWIN documentation mentions what steps need to be done for a custom render routine. You can also find a thread with sample code here. You can find all the required information about the widget in the GHandle: typedef struct GWindowObject { #if GWIN_NEED_WINDOWMANAGER // This MUST be the first member of the struct gfxQueueASyncItem wmq; // @< The next window (for the window manager) #endif const struct gwinVMT *vmt; // @< The VMT for this GWIN coord_t x, y; // @< Screen relative position coord_t width, height; // @< Dimensions of this window color_t color, bgcolor; // @< The current drawing colors uint16_t flags; // @< Window flags (the meaning is private to the GWIN class) #if GDISP_NEED_TEXT font_t font; // @< The current font #endif } GWindowObject, * GHandle; I'm going to prepare an example showing how to use cyrillic fonts within the following days. ~ Tectu
  11. Yes, the code runs here too. Also, I suggest you to use GIF images for animations like your "WELCOME" text, if you have the required amount of memory. Furthermore, you don't need to create a window all over screen. This is automatically done when you initialize GWIN. You're also using the old fonts. Make sure you read the blog from time to time. ~ Tectu
  12. Hello debayan and welcome to the forum, I just grabbed my embest board and flashed a working button example. Then I rotated the display and everything is still working nicely: gdispSetOrientation(GDISP_ROTATE_90); Could you please attach your code? On what release are you? I tried it out with the current master. ~ Tectu
  13. Hey man, sorry that this took a bit longer than expected but I finally found time to include it into the repo. It looks good to me so far. Can you please get the latest master and try to use the implemented driver? You may want to tell me your real name for the contributors table. ~ Tectu
  14. Can you please show how to reproduce your problem? The source does clearly show how the passed handle is used: void gwinDestroy(GHandle gh) { // Remove from the window manager #if GWIN_NEED_WINDOWMANAGER _GWINwm->vmt->Delete(gh); #endif // Class destroy routine if (gh->vmt->Destroy) gh->vmt->Destroy(gh); // Clean up the structure if (gh->flags & GWIN_FLG_DYNAMIC) gfxFree((void *)gh); gh->flags = 0; // To be sure, to be sure } ~ Tectu
  15. This clearly is a documentation typo. It's supposed to be gwinDestroy(). Thanks for finding, it has been fixed! However, if you need different sets of controls, the tab widget might be of your interest too. The /demos/modules/gwin/widgets demo shows how it can be used (along the very simple example on the tab widget documentation page). ~ Tectu
  16. Two lined button text is currently not possible. Of course you could add the text in the image of the button, if you're using the custom rendering routine. Please open an appropriate thread for future questions. ~ Tectu
  17. Thank you for sharing. I'm sorry but I won't have time before the weekend to check on this. I'll keep you posted. ~ Tectu
  18. Okay guys, here you go: unicode support! ~ Tectu
  19. I don't know of anybody which is currently working on this. If you want to source (sponsor) such a smartwatch, I'm open to look into this. ~ Tectu
  20. That will work soon. µGFX gets UTF support shortly. ~ Tectu
  21. Very nice! Thank you for contributing an advance ;-) ~ Tectu
  22. Sure, sounds good to me. I can wait ~ Tectu
  23. Yes, that's completely right. I will do it and add the driver with the new files. As soon as you are back, you can try the driver and tell me if everything works properly. Enjoy your vacation! ~ Tectu
  24. Okay, I finally got the time to look at your new driver. It looks a lot better now! There's only one more thing: Could you please split the I²C and SPI interface into two separate board files named gdisp_lld_board_example_spi.h and gdisp_lld_board_example_i2c.h? If you don't want to waste your time with that, I can do it as soon as I add the driver to the repository. Keep going the good work! ~ Tectu
×
×
  • Create New...