Jump to content

Joel Bodenmann

Administrators
  • Content count

    2,025
  • Joined

  • Last visited

  • Days Won

    2

4 Followers

About Joel Bodenmann

  • Rank
    µGFX Developer

Recent Profile Visitors

4,389 profile views
  1. uGFX-Studio v0.20 - Beta

    Thank you for explaining this. The reason it worked for me is because gdispOpenFont() returns the first font it finds if the specified font wasn't found. I was only using one custom font so I didn't notice the problem. This issue has been resolved now as well. We'll implement a feature that will prevent having multiple resources with the same name. Edit: There was actually a fundamental problem with names of resources. We fixed this now. All elements will have unique names now if you create new ones. So you get Unnamed, Unnamed_1, Unnamed_2 and so on.
  2. uGFX-Studio v0.20 - Beta

    Any other wishes for v0.20.4?
  3. uGFX-Studio v0.20 - Beta

    Can you please be more specific? What's the issue with the resource manager? It works well here. As I'll describe further down it was just that the code generator of the widgets didn't generate code for the per-widget font. But the resource manager appears to do well. I couldn't spot any problem with that. Those are not default fonts, those are just fonts we created ourselves. The term "default font" refers to the GWIN default font. It's correct that currently the resource manager doesn't give access to fonts already present in the µGFX library. Just add your own fonts. We do not provide the TTF for the fonts we created ourselves but you don't need that. You can just pick the UI1 and UI2 fonts from /src/gdisp/fonts and add them to the studio like you would with any other font you converted yourself. Just fixed that. Internally everything is present. The code generator simply didn't generate code for that property. Everything works as expected now. v0.20.4 will contain this fix. That's already supported. It was just the code generator that didn't generate the corresponding code.
  4. uGFX-Studio v0.20 - Beta

    Hello @jarekk, Thank you for providing your feedback. We added everything to the ToDo list. You can either select the font item and hit F2 or double click it to rename. But we'll add Rename as an option to the context menu as well. Can you be more specific on this? Where did I/we mention two default fonts? Will take care of that! Yes, it should. The generated code is µGFX high-level code that should work on any platform that the µGFX library runs on. That is fully supported. You select the default font in the target. Just edit the Default target. Please let us know whether that worked as intended. I will look into why the label doesn't get a font assignment. Most likely that just got missed out in the code generator.
  5. Information menu

    You need to attach the toggle to the widget by using gwinAttachToggle(). Have a look at the API reference and /demos/modules/gwin/widgets.
  6. Help with flushing into SSD1306

    The argument you pass to gfxAlloc() is the number of bytes you want to have available for your own use. If you request 40 bytes then you'll be presented with a zone where you can use all 40 bytes to your pleasing. However, the memory manager still needs to store some information (let's call this meta information) about the allocated memory. Most importantly it's the size of the block: If you call gfxFree() then the memory manager needs to be able to know how many bytes are going to be freed. It does that by putting a header in front of the memory that you get a pointer to. That's why you need a few bytes more than just what gfxAlloc() gets as a parameter.
  7. PushButton rounded with gradient color

    You're welcome - happy to help!
  8. PushButton rounded with gradient color

    This must be incredibly slow! As @inmarket mentioned, filled arcs are extremely complex and slow. Wrapping it in for() loops is no good here Images will be vastly faster than this. It of course depends on your system and the available resource but it's pretty safe to say that almost any system will be vastly faster with images than this. Of course, you don't want to re-decode a PNG every time you have to render your button. So either cache the image or use an image format that is extremely fast to decode (such as BMP or even better: NATIVE).
  9. PushButton rounded with gradient color

    Hi, There's currently no existing rendering function for that. Depending on your needs (and your platform / available resources) you might want to consider using images.
  10. uGFX-Studio v0.20 - Beta

    @Steffan Thank you very much for providing this detailed feedback. We appreciate it a lot and we'll get straight to work! @ForTest We just tried that with v0.20.3 and it works without any problems. Can you please tell us what doesn't work for you? Is "rounded" not in the list of predefined rendering functions? Is it a simple refreshing error? If so, try to move the widget after changing the rendering function.
  11. Information menu

    Hello Alan, The gwidgetVMT allows you to register functions for the following toggle events (copied from the documentation): uint16_t toggleroles; /**< The roles supported for toggles (0->toggleroles-1) */ void (*ToggleAssign) (GWidgetObject *gw, uint16_t role, uint16_t instance); /**< Assign a toggle to a role (optional) */ uint16_t (*ToggleGet) (GWidgetObject *gw, uint16_t role); /**< Return the instance for a particular role (optional) */ void (*ToggleOff) (GWidgetObject *gw, uint16_t role); /**< Process toggle off events (optional) */ void (*ToggleOn) (GWidgetObject *gw, uint16_t role); /**< Process toggle on events (optional) */ The toggle status is not saved in gw->g.flags. A toggle can have two states: on and off (true or false, 1 or 0, ...). You get a call to ToggleOn() and ToggleOff() accordingly. It's up to you as a developer to decide what to do with that information afterwards. In case of the existing pushbutton widget we just change the internal flag of the pushbutton that keeps track of the pressed/unpressed state. But in your widget you do whatever you think is best. ToggleOn() and ToggleOff() just inform you that the state of the toggle (the hardware button) changed. The rest is up to you.
  12. Starting a Project with ugfx on chibiStudio (ChibiOS 3)

    Hello and welcome to the µGFX community! From the µGFX perspective you have done everything right so far. It appears that the only compilation errors you're getting are from ChibiOS. The errors you're getting indicate that you didn't enable some of the peripheral drivers and peripherals themselves. Make sure that you enable everything you need in the ChibiOS's configuration file halconf.h and mcuconf.h. There should be examples for these files in the corresponding board file directory /boards/base/Embest-STM32-DMSTF4BB/example_chibios_3.x/. I hope that helps. Don't hesitate to ask if you have any other questions. We're happy to help wherever we can!
  13. uGFX-Studio v0.20 - Beta

    Hello @Shamim and welcome to the µGFX community! This is definitively the right spot for those sorts of things! Thank you for bringing this to our attention. We just released v0.20.3 which fixes this problem. You can just re-download the latest version from the downloads page.
  14. Information menu

    Hello Alan, Yes, that is exactly correct! You use gwinAttachToggle() to attach your hardware button to the widget and inside your custom widget you can add the functions to handle the toggle input in the VMT as described in the wiki.
  15. Help with flushing into SSD1306

    Great work at getting it working! Thank you for sharing your findings with us! The reason your memory requirement is so high is because the SSD1306 driver has to maintain an internal framebuffer. That's simply due to the fact that the SSD1306 driver requires you to write entire chunks of pixels each time - so that's a limitation given by the display controller you're using µGFX is capable of using external memory. That's no problem at all. You can locate your framebuffer anywhere you want. In fact, some driver, such as the STM32LTDC almost always use external memory for that.
×