Jump to content

king2

Members
  • Posts

    117
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by king2

  1. According to "You are using an un-tested compiler. Please report any compile errors or warnings on the ugfx forum" I reporting warnings here (IAR):

    (orientation_t and powermode_t):

    Warning[Pe767]: conversion from pointer to smaller integer gdisp_lld_STM32LTDC.c 318

    Warning[Pe767]: conversion from pointer to smaller integer gdisp_lld_STM32LTDC.c 320

    Warning[Pe767]: conversion from pointer to smaller integer gdisp_lld_STM32LTDC.c 327

    Warning[Pe767]: conversion from pointer to smaller integer gdisp_lld_STM32LTDC.c 331

    Warning[Pe767]: conversion from pointer to smaller integer gdisp_lld_STM32LTDC.c 333

    Warning[Pe767]: conversion from pointer to smaller integer gdisp_lld_STM32LTDC.c 357

    also:

    Warning[Pa093]: implicit conversion from floating point to integer gdisp.c 1728

    Warning[Pa093]: implicit conversion from floating point to integer gdisp.c 1729

    Warning[Pa093]: implicit conversion from floating point to integer gdisp.c 1855

    Warning[Pa093]: implicit conversion from floating point to integer gdisp.c 1856

    Warning[Pe767]: conversion from pointer to smaller integer gdisp.c 2676

    Warning[Pe188]: enumerated type mixed with another type gdisp.c 3308

    Warning[Pe188]: enumerated type mixed with another type gdisp.c 3368

    and last:

    Warning[Pe1105]: #warning directive: "GDISP: GDISP_NEED_ANTIALIAS has been set but your hardware does not support reading back pixels. Anti-aliasing will only occur for filled characters." gdisp_rules.h 65

    I'm using STM32 LTDC driver, that uses part of SDRAM as videobuffer, so reading pixels is possible.

  2. Thanks you for patience.

    1. You have added to button possibility to be an arrow, to have rounded corners, to be elliptic, to react on keyboard or dial or touch panel. All these possibilities have corresponding defines that can be enabled or disabled. One more define like GDISP_PASSIVE_EVENTS can make possible reacting on events, so no resources will be lost for users who do not need this. This matches your guidelines about flexibility, power and compact code in one box. I do not understand difference between elliptic buttons and label event generation. Just one more feature that can give more flexibility to user.

    2. It is not necessary to implement full event stack for window manager, with full path to parents and so on, I know what is embedded and memory limitations. WM already can handle clicks on widget's area, so we can just generate one single event in situation when event not generated now. I have attached patch in previous message, and label generates event without any problem.

    3. It is strange to listen reasons about code size, memory limitations and method with replacing WM or custom draw routines in one message. WM can be replaced at runtime, as well as custom draw routines. So I will have in my firmware stock WM compiled in, and stock draw routines compiled in. All this code will not be used but will take place in final firmware. So, size overhead will be more each time we replace some code at runtime.

    4. I understand that Studio is beta, but can not agree that Studio can be used only at start point. It looks like Studio will allow full development process in 0.13 - 0.14 (i.e. in a weeks). It will allow possibility to be used in late stages of development, will it be suitable for this or not - it is not so important.

    5. I can make myLabel with events, or I can modify core Label. I agree that modifying core code is a bad idea, but as result I will get same problem - I need to change code when I will upgrade uGFX. Or I will need to apply my patch to core Label, or apply changes in core Label to myLabel.

    6. Problem with only one event at a time exists now and will exist later - if I will click two buttons at one time and will not detect event in main loop - I will lost one of these events. Label that can generate click event not differs from another button in window.

    In other words, there is no need to change event system. Adding events with defines into main repo will not break anything, and will consume no additional resources except few kilobytes for sources on hard drive. Adding events was tested and works well for me. Replacing entire code with another that differs by 1% at runtime - bad idea consuming much more resources in firmware. Adding fullstack events and WM with overlapping objects is not necessary, because now all works well.

    I'm too deep in uGFX, so I have to use it.

    I will copy-paste widgets into new widgets with events, or will change them in core code - I do not know. It is simpler to change core code (as this already done), I will get no advantages in upgrading if I will make new set of widgets.

    I will use labels, progressbars and button as now, one over another, without writing new widget like 'ImageButton with text and progressbars'. Overlapping works fine, I will just react on events in main loop: just one event handler for progressbars, label and its button in switch(). Event generation by labels and progressbars will solve all my problems in GUI building, without need to make new event engine or window manager and without code overheads in firmware.

    I'm sure a nice donation of a few thousand dollars would enable Tectu to spend a lot more time on Studio and advance its capability very quickly.

    Thank you about mentioning this, but I have no possibility to make such donations (average salary in your country and in my country differs).

    I think I wanted too much. Sorry.

  3. I programmed on Delphi/C Builder in 90th, and it was great approach - you make display page visually, and then add reaction on events. This was pretty simple to use and to understand. Place items, write event handlers. App is ready.

    All widgets (all, even label) had basic events like click, dblclick, mouseon, mouseout and similar. If you clicked on label, label's click event raises. If you missed on label and clicked on its container, container's click event was raised. If you missed on container too, window click event. One idea, one behaviour. Was no items with physical possibility to click on them, but with no click event. Each click event was detected, counted, carefully wrapped into gift pack and transferred to its receiver. Or its parent if we was missed a little.

    "Widgets are defined by their functionality, not by appearance". What if I want to have text label that can be in 4 states? And it really text label, by appearance. Should I use special checkbox with extended quantity of statuses, or write special widget, or use listview with my custom draw routine, producing more and more copy-paste code just to keep idea that 'everything with more than 2 states is listbox'?

    This is unusual behavior for text label, ok, but why not take label as is, with its excellent appearance (95%), and allow to programmer to add unusual behavior (5%), instead of rewriting it all by copy-paste?

    What will break if static object will send events?

    I think I will never understand this.. :(

    uGFX allows programmer to customize many things. Plain C allow programmer to customize everything.

    Sorry, I will not write such thing anymore.

  4. OK, I got the point. So, my patch is useless now for me too, because it will be not applied to uGFX.

    I can use button instead of text label, but can I have button without border? With auto-width? With word-wrapping? In Studio?

    This means for me that I have to write my own custom draw routines and widgets for almost everything and makes Studio useless.

    Thanks for clarifying your position.

  5. I think that post-generate script is excellent idea, as it will allow user to parse source files and add/change anything, or copy, or anything else.

    But this will not help with locked files, IAR locks files from time to time, I do not know why.

    I think that error reporting will help better in this case, message like "Directory 'D:\test\output' cannot be removed" or something like this. If user will see this message, he can know which program is locking (in my second I just entered into folder by FAR manager and folder was locked from unlinking).

    Users can include source to project from any folder, so you can do this, but it is definitely not first priority, as for me.

  6. I have forked current uGFX, cloned fork to my PC and added events to text label, progressbar and container. Event numbers - just increments from existing numbers.

    I cannot make pull requests on uGFX repo (or I do not know how to do this), so I attached patch to this message.

    If patch will be applied before main repo will change - all should go without problems.

    I have not added events for image and graph because it is not widgets and have no widget's VMT.

    patch.zip

  7. but will also save you time when upgrading to newer uGFX versions in the future.

    If I will make patches, and patches will be applied over uGFX, I will save my time by NOT changing code in newer versions :)

    I really think it will be useful even if I will make my own widget, just to make things better (for future users).

    I use text labels to display values, but I want to change value's units, for example A, mA or uA for current measurement. Best way for me - allow user to do it just by tapping on value, and.. I can't!

    I will add events to uGFX passive widgets and send patches.

  8. Of course this would be just a temporary solution for the 0.13 release.

    It will be huge step forward, as for me!

    Works here without any issues. We tested this on a Windows 10 64-Bit machine. Can you let us know what system you're using (and double check whether it's really not working)?

    Windows 8.1, 64-bit. But now it is working!

    I have tested what was wrong, only difference - Adobe Photoshop was running in background :evil:

    p.s. Can't wait for 0.13!

  9. I have changed already gwin_label.c exact way you pointed in your message. It works.

    Custom widget requires me to write widget with:

    - progressbars or not, its positions

    - text or not, positioning, font, fontsize

    - changing image

    - ability to react to text tapping as button click, or just as text tapping

    Each time in similar situations I'm afraid that I will code not so good, or will miss something, and my code will be bad and ugly.

    After all this, I will get widget that I cannot use with Studio :)

    For me, fast way now - is to use event approach :(

    I think that modifying core code is a bad idea, this because I'm asking about chances this changed to be a part of core code in future.

    I can modify library code by myself and send patches to you, if it will be useful and will simplify including this changes into future releases.

  10. Thanks for pointing me to slider. They looks so similar..

    But anyway, is there any chance that even passive elements will make touch events in uGFX? If yes, I can just add sending events to uGFX lib for temporary use, and use this approach in future when events will be added to main branch.

    If yes, I can just react on such events.

    If progressbar or text label was clicked, I can just send button's click event.

    If button was clicked, I can just redraw all elements over it.

    And second reason: I believe that all objects should react on clicking, this makes all widgets similar. One type (widget), one way to react (send click event when clicked). Any tap should raise event associated with some object (widget, or container, or window).

    I believe this will add flexibility to library.

  11. Sure, I can write workarounds, but I hate too much workarounds, especially ones that copies 99% of original code :(

    I understand that transparent background requires to redraw underlying objects. I can do it (refresh my button) by myself when updating text in label (but it will be better if this will do window manager for all underlying objects).

    OK, it is point to decide will I write my own window manager, transparent text labels, sending events by labels and progressbars, and so on, or not...

    Thanks for answers..

  12. Hello developers! :)

    uGFX uses converted fonts. If user will use several sizes of same font in application, this approach requires much space in firmware, one for each size.

    Did you tried to use direct embedding TTF to firmware? In some cases this can save space and make firmware size smaller, and will allow to use any font size!

    I found gdispScaleFont in gdisp_fonts.c file. Can I use it to reduce space required for fonts if I need same font with different sizes?

    Thanks!

  13. More feedback.

    1. From time to time I getting error "Something bad happened". How to determine what is wrong?

    2. If I turn off control, main.c generates with gdispSetBacklight() and gdispSetContrast(), which raises a error.

    3. Calibration values cannot be pasted for unknown reason.

    Error 1 is critical - I can not do anything with project, my work is blocked now.

    update: Error 1 was solved - files was locked by IAR. Anyway, adding some info to error reporting will be useful to save user's brain and all universe around. :)

    update2: "Something bad" again, and it is not file locking. I'm starting determining what is harder - my head, or wall near me. :)

    update3: Wall is harder. Now generator is completely right!

    update4: Still locking issue, now for folders. Studio was not able to delete 'output' folder.

  14. Thanks!

    Yes, it will be even better that my proposal, because Studio will able to display labels with selected font not in preview only, but in designer too.

    As I understand, Studio will have menu item, and when user will click on it, Studio will ask user for TTF file and for converted file (two file inputs). After user was selected both files, Studio should parse converted file for font name, font size, and all structures, and add font name into dropdown boxes, then save info into project. When generating fontfile for compilation, Studio will make MF_INCLUDED_FONTS entry from all collected fonts.

    Am I right?

    Looking forward to 0.13 :)

  15. About new widget: no widget was developed, I just changing values in text labels according to encoder (external hardware part) moves.

    Yes, I know that Studio is just a code generator. But I like it. I want to help to make it better!

    My problem now is a fact that I cannot use Studio for GUI designing (but as for me, uGFX Studio is most promising product, I can see that you want to make it better and responding to feedback :roll: ).

    Now I can just design display page, move it into firmware (changing fontnames, adding my code changes. each time!!!), compile it, download into hardware and see that I should change coordinates and width of my text label, then repeat this again and again and again.. measuring pixels by ruler is VERY boring process. And I asking myself, why I trying to use Studio if I can change coordinates in firmware code? OK, Studio made example for me, now I should change all things by myself in code, and forget about Studio!

    I think this is wrong! If I use software that can do 95% or work, why not do 5% more and make 'GUI design and support software' from just 'GUI demo maker'?

    So, first step to make Studio excellent for me is allowing to make GUI without downloading into hardware, and get results in preview. I need my fonts in preview (very important), and I need possibility to include my own code changes into preview (not so important, but important too). I using my own converted fonts and cyrillic chars. For example, I want to use big (really big!) digits, but have no way to do this.

    To make it possible, maybe you can add possibility to define own fonts for Studio users and use them in preview?

    May be, like this:

    - user can define (in settings tab) .c or .h filename with converted fonts inside

    - Studio will never rewrite this file

    - Studio will scan this file for font names

    - Studio will add font names to font selection dropdown boxes

    - Studio will include this file (if exists) in generated code and use font names from this file

    This will allow me to see my GUI in preview without downloading into hardware.

    What about code changes, you can add "// USERCODE START [user code] // USERCODE END" section at end of each createPage() function and just move all what you found there into new generated files.

    This is relatively minor changes, but it will allow to use Studio for GUI designing in most complicated cases!

    As I told before, I really think that GUI design software should make life easier, and if I cannot use my fonts - it is something like if Studio would not able to change color of text. Not so big problem, but makes using impossible!

    I need no 'bells and whistles' like font converter included into Studio, custom font rendering engine in designer part, detecting user code changes by neural network, or something like this. But as programmer too, I hope that my variant of features will take not so much time, but will allow to really use Studio in work.

    So, for now my priorities to features:

    1. possibility to include custom (converted) fonts in preview

    2. possibility to leave some code intact in preview

    3. including graph and tabset widgets into Studio

    I really believe that implementing at least 1 and 2 will allow Studio to become really powerful and useful not just for makeing example interfaces, but for using it to design complete GUI and even use it later if I will decide to change or add something to existing firmware.

    Sorry for much text. :)

    p.s.. Other small feature request: possibility to make text label's transparent background :)

    p.p.s. Anyway, tomorrow I will write script that will get files generated by Studio, change fontnames, add user code and save result into firmware folder, because I cannot wait for two weeks, I should develop interface by end of this week :(

    But such features in Studio still important!

    Should I share this script in forum?

  16. I'm glad to know that my bugreports are useful :)

    1. Yes, I know that this is not best to place container with total size of window, but I had it placed before you told me first time.

    Another way was to change parent in properties, but for me it was better to use search-and-replace in .ugfx file. So, now when I know it, it is not problem for me anymore :)

    2. Glad to know this. Waiting for 0.13 :)

    About frame widget: I have to complete project as soon as possible, and I was switched to uFGX already (to support making your product better, because of my endless questions, bugreports and feature requests:)), so I cannot wait frames to be implemented into Studio (it has no tabset and graph also).

    So I will use display pages as frame windows.

    I had also solved problem with absence of widget for digits change (textedit with up/down arrows). I had several approaches, to develop widget by myself, or to use screen keyboard, but I have encoder in my project, so I will use it to change values (while user will select field by tapping on it).

    Waiting for 0.13 :)

  17. Fresh bugs/feature requests! :)

    1. I have one container with size of window (filled with items). When I tried to resize it, so I can drag all items to window, I have changed size of container and all program was frozen. I suspect this is because coordinates of children items becomes bigger than parent width (or height).

    I have solved this problem by direct .ugfx file editing.

    2. Another one possibly useful feature: copy all item properties (font sizes, for example) when duplicating via Ctrl-D.

    3. Background manager: create rectangle and text label on top of rectangle. Close background manager. Open it again. No text label!

    Close it again. Open. Wow! Text label re-appeared! Close, open. No label. Close, open. We can see text!

    It appears and disappears at each 'close/open' of background manager.

    Question: I have main interface with several buttons, most of them should allow user to tune some parameters (or show some information) when clicked. How can I design frame windows for such actions?

  18. In my project I must have buttons with other elements over, for example, labels and progressbars. My button is button that have picture and some info inside it, I must refresh some info displayed inside buttons (and I use progressbars to show audio level).

    You can see screenshot here: viewtopic.php?f=28&t=243&start=80#p2485

    But I have a problem, when I click to button, button itself if rising and all other elements is hiding. I need to have them displayed over button all time (more, I need to have button pressed if user was tapped over any area inside button).

    Can I do this without breaking everything in uGFX? :)

  19. Thanks!

    0. Yes, for example, errors in generated gui.c from preview:

    gdispImage button_usb_green;
    gdispImage button-cross; // <--- error is here

    In this case I tried to use button-cross.gif as button image.

    1. Ok, I got it. I have added container just because I cannot be sure about window size in pixels because window width is 804 or 805 pixels in my case, not 800 :)

    2. If width and height of text rendered in Studio will be equal to same sizes in preview - it will solve 90% of this problem.

    3. OK, i will. I must to have labels and progressbars inside (or over) button for my task.

    4. How can I do it with Studio?

    When Studio 0.13 can be expected? :)

  20. I looked at graph widget.

    As I understand, it have no ability to add new point when shifting old points to desired direction, right?

    So, if I want to make something like slow oscilloscope, I should:

    - add points to widget, until x=max (this fills empty area with points, one point in a tick)

    - then for each new point in each new tick I should:

    - shift data array like Y(n-1) = Y(n)

    - Y(max) = new value

    - redraw entire widget with all points from data array

    Is it right?

×
×
  • Create New...