‎2020-01-28 02:37 AM
Now that I have managed to get the LCD working (thanks for the helpful members on this forum) I'm able to send data on the LCD. Sending one value is ok, but I have the actual data in a struct that I'm able to send through a queue for the model. Question is now how to display those results on the LCD? Do I have to make separate text areas with wildcard values for every value I want to display, or is there a more convenient way of doing it? In TouchGFX there's a container "List Layout" but I don't know if that has anything to do with this.
‎2020-01-28 02:40 AM
Hi,
Please absorb the information in the the sticky on integrating backend with UI. Should have what you're after.
Essentially, you use the modelListener interface to propagate values (you could send your entire struct) to the active view. Your view will then react to these updates by adjusting its UI elements (updating the wildcard buffer for a TextArea and rendering it).
/Martin
‎2020-01-28 06:55 PM
If you were asking if you needed to have a text area with a wildcard (or 2) for every item, I believe the answer is yes, since its the wildcard that gets updated.
(there may be other ways)
I constructed a screen programmatically with an array of text/wildcards, and I update them in a loop using data received via queue. it made the software a little smaller, but I doubt its that much better than just doing it discretely for everything I want to update.
Bob
‎2020-01-29 12:18 AM
Yes, thanks. I just wanted confirmation on that. I am trying to absorb the info, but you know..that would require some skills in programming :> So, did you send the data in a struct or send just one value at the time or how? I have gotten this far and I'm close. When I get this done I can start wrapping it all together.
‎2020-01-29 05:42 AM
You can send the data anyway you want (structs, basic types, etc) - It's still C++.
/Martin
‎2020-01-29 05:48 AM
Yes, I got it working. Had to just change the functions parameter types and return values the same as my defined struct type.
‎2020-01-29 06:06 AM
Great!