uiflow Lcd.print function issue or feature ?
robalstona last edited by
Hello, I noticed the difference in how the lcd.print function works on older versions and the new uiflow version. On 1.4.2, 1.4.5 (on these I checked) the function displays on the screen text in a given color with a black background. Whereas in version 1.5.3 the same function displays the text in a given color with a transparent background.
Both solutions have their pros and cons.
Is there any option or additional parameter to set the background color of the text instead of transparent in the Lcd.print function.
I often use such a trick (to avoid screen flickering) that instead of cleaning the entire screen, I simply display the new text in the same place as the previous and old text was "covered" with the new one, while in version 1.5.3 you can see all previous overlapping self lyrics.
And here is the problem, because wanting to upload such a program previously written on version 1.4.5 on the firmware version 1.5.3 practically to be changed again the whole concept and code displaying content
ajb2k3 last edited by
1.5+ moved to mainstream Micropython. you should check out the official micropython website for api assistance.
Interesting find @robalstona I'll have to look into this one. Uiflow changing to mainstream micropython shouldn't have changed much though since as far as I know the lcd module is still based off of loboris's work, I do seem to remember there being a parameter for setting background color, have you tried entering an extra hex value after you set the text color?
robalstona last edited by robalstona
@lukasmaximus I know I can enter additional parameters but for this I have to use either the python tab or the "execute" block. As a last resort I'll make a custom block.
The problem is rather that the same function with the same parameters from version to version changes the result of its operation.
I suspect that this was a conscious procedure in connection with a change in the graphic design of uiflow 1.5.4 firmware where the inscriptions overlap the graphics in the start menu.
I would care more about changing or expanding with additional parameters one of the built-in block or maybe create new built-in block.
wingtiger last edited by
So there are two issues here, transparency and background color for lcd.print block.
I solved the transparency issue by placing an execute block with "lcd.font(lcd.FONT_DejaVu24, transparent=False)"
before calling print block. This is handy since you only need one execute block. Font size doesn't matter.
But this is not a good solution at all especially for young developers.
For background compatibility, the behavior of the transparency of lcd.print must be the same as the older versions.
@lukasmaximus, could you consider fixing this on the next beta?
If this is a specificaiton, then uiflow needs to have some other blocks to setup the transparency for text drawings.
In addition, it is good to have a means of specifying a background color for lcd.print.
robalstona last edited by
@wingtiger Thanks for the info with this font loading command. The problem is that to upgrade to the new firmware version I have to change most of my programs.