2019-02-13 06:09 AM
I want to make a graph (let's just use a y = sin(x) function as an example) on my STM32 discovery board. I can make a basic gui from the standard widgets you get when you first run Touchgfx designer and I can add code to make them do stuff as well. I saw no way to add a graph so I googled it and found out you need the graph widget from the repository found here: https://github.com/touchgfx/touchgfx-open-repository
I have downloaded the repository and my question now is how to get the graph widget into TouchGFX designer so I can start coding it to display y = sin(x)? I have a bunch of folders from the repository and the TemplateView.cpp/.hpp files tell you what the individual functions do but not how to get the widget itself into the designer. Apologies if I am missing something obvious here but I could find no clear answers anywhere else.
Solved! Go to Solution.
2019-04-04 01:00 AM
2019-02-13 10:16 AM
Hi @Shake777,
The graph widget is not a part of the designer (yet), so i'm affraid every effort involving that widget is manual. We're always working on adding more widgets to the designer - To start with we're adding support for the widgets that are already a part of the framework in code but are not yet in the designer.
How far did you get? I'm going to post a small example that shows how to use the graph at earliest convenience.
Best regards,
Martin
2019-02-13 11:54 AM
Thanks Martin. So far I just have the entire repository downloaded and sitting on my desktop. There is a graph folder in the repository with lots of source code (and a few folders) and header files that I don't know where to put. Do they go in the touchgfx install directory or in my project directory? Where exactly? What do I then need to do to get the custom widget to run? I think I just need to know how to make a downloaded custom widget work in general.
2019-02-13 02:37 PM
The thing is: The widgets and examples on the open repository are made for a particular version of TouchGFX (4.3.0 in this case) and aren't maintained as new versions come out. I can tell from the structure of widgets/graph that we pushed a sort of incomplete application, i guess for inspiration, since the application structure would be subject to change a bit.
What you would do is create a blank application and then import the files in widgets/graph and use it like it's used in TemplateView.cpp/.hpp.
We do have a sample application somewhere for an older version. I'll try to get it up to speed for the latest version of TouchGFX.
2019-04-03 07:08 AM
Hi @Martin KJELDSEN ,
Dou you have the small example that you talked about?
2019-04-04 01:00 AM
2019-04-04 04:39 AM
Thanks @Martin KJELDSEN !
2019-04-04 04:48 AM
You're welcome! :)
2019-08-21 12:30 AM
Hi @Martin KJELDSEN ,
I am trying to use this Graph Widget on my application. This Widget works for a 16 bit Color Depth Display, however mine is in 24 bit Color Depth. My Board is "ETEM043005XDH6"
I changed the "PainterRGB565" into "PainterRGB888" in Graph folder, but I think it's not enough.
Now I can start the simulator, so I move to the corresponding screen but nothing is drawn. If I press "F2" during the simulation I can see area getting invalidate but there is no line inside.
Do you have an idea of what is missing or bad configurated?
Is there something else I need to change to run this widget on a 24 bit Color Depth Display ?
Best Regards,
Guillaume
2019-08-21 12:35 AM
Is the rest of your application also running in 24bpp ?
/Martin