Hide/unhide parts of the content #114
Replies: 1 comment 1 reply
-
Yes, CMD_APPEND can be used for that. A block of commands added with CMD_APPEND could be: or if this for a groups of icons: CMD_APPEND needs 12 bytes. So in this scenario using two snippets with different colors would remove 20 or 12 bytes of traffic from the SPI per icon but would also add 64 or 48 bytes to RAM_G per icon. And adding a touch-tag increases the saving on the SPI by additional 4 bytes with 8 bytes of cost in RAM_G. I usually just go with changing the colors on the fly but then I usually do not need to reduce the traffic on the SPI to a bare minimum. Bad example of what I did in a project as this would not benefit from using CMD_APPEND:
So I rather re-arrange the display-list to avoid sending duplicate commands. So there is not really a best way to do this, it depends on the application what is good enough given the restraints. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am thinking if is possible somehow, to hide or unhide an icon, or to change the color of a text, without modifying the entire content.
In this scenario, my background is black, and the icons are white. If I want to deactivate an icon, I am thinking that changing the color into black will do the job.
In order to have control of each component, can I use the append method for each component individual ?
As example, I have 6 icons, and each of them can be on or off. I start the display with them off. I go into settings menu, and activate on of them. When I return, I expect to see that icon on. in this scenario, what could be the best approach?
I am thinking to use like a static method for each state. I create the method for icon when is On, another method for when if Off, for each methods I get the ram address as return, and when I run the content, and switch to other state, I only append the specific ram address into the display list. Could be this a solution?
Beta Was this translation helpful? Give feedback.
All reactions